Problem/Motivation
I have included webform's composer.libraries.json in a project-level composer.json. However, I see a warning on the Drupal Status page that popperjs is included via CDN, whereas all the other libraries have been correctly installed in the libraries folder.
Popper.js 2.11.6 (CDN).
Please download the Popper.js library from https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz and copy it to /libraries/popperjs or use Drush to install this library.
(Popper.js is used to provide tooltip behavior for elements.}
As an additional bug note, you can see that the blockquote ends with a curly-brace } instead of a closing parenthesis.
Steps to reproduce
Look in composer.libraries.json to see the popperjs library is missing from there.
Include the file in composer.json with
"require": {
...
"wikimedia/composer-merge-plugin": "^2.0"
},
"extra": {
"merge-plugin": {
"include": [
"web/modules/contrib/webform/composer.libraries.json"
]
},
Proposed resolution
Add the missing library.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3331106-10.patch | 4.49 KB | jrockowitz |
| #7 | 3331106-6.patch | 4.68 KB | jrockowitz |
Comments
Comment #2
solideogloria commentedComment #3
solideogloria commentedComment #4
solideogloria commentedComment #5
cilefen commentedIs this a duplicate of #3310154: [Drupal 10.x] core/popperjs asset library is deprecated?
Comment #6
solideogloria commentedI'm using Drupal 9.5.0 and Webform 6.2.0-beta4, so I have those changes. It's not a duplicate.
If you look at the commit for that issue, https://git.drupalcode.org/project/webform/-/commit/1152d8e, the changes only add the CDN. Nothing is added to the composer.libraries.json.
Comment #7
jrockowitz commentedHere is a patch, and I will commit the change.
I will probably tag new beta sooner, rather than later.
Comment #9
jrockowitz commentedComment #10
whthat commentedFYI, This patch fixes PopperJS. This patch also removes Algolia Places and puts it in the same CDN only type situation, causing a similar error "Relying on a CDN for external libraries can cause unexpected issues with Ajax and BigPipe support.". This is likely related to the deprecation for Algolia Places with webforms, and worth noting.
Comment #11
jrockowitz commentedHere is a better patch.
Comment #15
leisurman commentedUsing Drupal 9.5.8 and Webform 6.2@beta5, I also tried using
6.2.x-dev. Patch #11 and #6 did not apply.
Comment #16
solideogloria commentedYou should use 6.2.0-beta6, which already has the changes applies. You don't need to install a patch at all.
Comment #17
solideogloria commentedIn addition, you can't apply a patch to a composer file. It's impossible, because the composer file is required prior to patching.