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

CommentFileSizeAuthor
#11 3331106-10.patch4.49 KBjrockowitz
#7 3331106-6.patch4.68 KBjrockowitz

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Issue summary: View changes
solideogloria’s picture

Issue summary: View changes
solideogloria’s picture

Issue summary: View changes
cilefen’s picture

solideogloria’s picture

I'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.

jrockowitz’s picture

StatusFileSize
new4.68 KB

Here is a patch, and I will commit the change.

I will probably tag new beta sooner, rather than later.

  • 3339961a committed on 6.2.x
    Issue #3331106: popper.js library missing in composer.libraries.json
    
jrockowitz’s picture

Status: Active » Fixed
whthat’s picture

FYI, 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.

jrockowitz’s picture

StatusFileSize
new4.49 KB

Here is a better patch.

  • jrockowitz authored 06860a6e on 6.2.x
    Issue #3331106 by jrockowitz: popper.js library missing in composer....

  • 84edaf4b committed on 6.2.x
    Revert "Issue #3331106: popper.js library missing in composer.libraries....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

leisurman’s picture

Using Drupal 9.5.8 and Webform 6.2@beta5, I also tried using
6.2.x-dev. Patch #11 and #6 did not apply.

solideogloria’s picture

You should use 6.2.0-beta6, which already has the changes applies. You don't need to install a patch at all.

solideogloria’s picture

In addition, you can't apply a patch to a composer file. It's impossible, because the composer file is required prior to patching.