Allow JsDelivr CDN user to select domain to use for CDN

Created on 2 May 2024, 9 months ago

Problem/Motivation

The domain cdn.jsdelivr.net has encountered SSL certificate issue. This cause all bootstrap / drupal-bootstrap assets to fail and the theme / subthemes broke down.

Steps to reproduce

  1. Just go to any site with bootstrap subtheme (8.x-3.x) and clear cache; or Install a new copy of Drupal with a bootstrap 8.x-3.x subtheme.
  2. Enable the theme.
  3. In theme setting, select "JsDelivr" as your CDN provider.

The style of bootstrap elements, most notably the menu button, will be broken.

Proposed resolution

Wile the domain cdn.jsdelivr.net failed, the alternative domain gcore.jsdelivr.net, fastly.jsdelivr.net (and perhaps cdnjs.cloudflare.com) still work.

The quicker way to "fix" is to subclass "Drupal\bootstrap\Plugin\Provider\JsDelivr". Overriding the method getCdnUrlTemplate() with a domain modified option.

A more profound way would be to allow provider to have further settings of the CDN domain to use for jsdelivr.

Remaining tasks

Decide which to do and then implement it.

User interface changes

Depends. Could have new appearance settings for the theme.

API changes

Probably none

Data model changes

Probably none

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇭🇰Hong Kong yookoala

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @yookoala
  • Status changed to Closed: won't fix 2 months ago
  • 🇵🇪Peru hatuhay Lima

    Closed with more than 6 months inactive.
    Reopen only if patch or fix proposed.

  • 🇨🇦Canada joseph.olstad

    @yookoala , a workaround would be to use the custom CDN option.

    With that said, I haven't come accross this issue. I will re-open it because we should fix it if it's a common issue.

    Keep in mind, the latest release of Bootstrap 3 upgrades the library , we are no longer using the twbs source, it's now entreprise7pro.

Production build 0.71.5 2024