"Library still loads from CDN" even if properly placed

Created on 18 August 2022, over 2 years ago
Updated 22 August 2024, 3 months ago

Problem/Motivation

Eventhough the library is correctly placed at
/web/libraries/cookiesjsr/dist
with version "version": "1.0.13",

The following logging entry appears in watchdog:

Library still loads from CDN. You disabled to load Cookies JSR from CDN but you didn't installed the library locally. Please Download the library with Version >=1.0.13 from github (https://github.com/jfeltkamp/cookiesjsr/tree/1.0.13) and place it in the libraries folder (@docroot/libraries/cookiesjsr/dist/cookiesjsr-preloader.min.js to reach the loader script.)

Steps to reproduce

Install cookiesjsr library using composer
Disable loading from CDN
See watchdog

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

1.1

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany SteffenR Germany

    We had the similar problem in on of our projects.

    The reason was the missing cookiesjsr-preloader.min.js file in the npm asset, since we are fetching all of our external libraries via composer.

    This could be fixed by adding the following entry to the repositories section of the composer.json.

    "cookiessjr": {
                "type": "package",
                "package": {
                    "name": "npm-asset/cookiesjsr",
                    "version": "master",
                    "type": "drupal-library",
                    "dist": {
                        "url": "https://github.com/jfeltkamp/cookiesjsr/archive/refs/heads/master.zip",
                        "type": "zip"
                    }
                }
            },
    

    Afterwards you can require (first remove if already installed) the composer package via:

    composer require npm-asset/cookiesjsr

Production build 0.71.5 2024