Adjust composer.libraries.json to match webform standards and prevent webform issues

Created on 22 March 2021, over 3 years ago
Updated 20 October 2023, about 1 year ago

Hey there,

Problem/Motivation

i added the new drupal/anchor_link composer.libraries.json to my composer.json. Everything on anchor_links side works as expected but now I am missing ckeditor/fakeobjects and ckeditor/link on webform side. This is due to the reason that webforms composer.libraries.json adjusted the installer name of the installed packages

e.g. for ckeditor/link:

"extra": {
                    "installer-name": "ckeditor.link"
                },

In this case Webform is looking for libraries/ckeditor.link but for drupal/anchor_link it is installed as libraries/link.

Steps to reproduce

Just have both composer.libraries.json in your composer.json in this order

"merge-plugin": {
            "include": [
                "web/modules/contrib/webform/composer.libraries.json",
                "web/modules/contrib/anchor_link/composer.libraries.json"
            ]
        },

and run

composer update --with-dependencies

Proposed resolution

Following webforms given standard for composer.libraries.json and add the installer-name attribute to make the libraries available to both modules.

edit:
All module paths to the plugins would have to be adjusted, too. This only works with the exception that both modules have to use the same version of the plugin. As far as I know multiple versions of the same package are not supported by composer. I guess this has to be overthinken to get to a clean solution.

πŸ› Bug report
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

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.

  • πŸ‡ΊπŸ‡ΈUnited States Nuuou Lincoln, NE

    Re-roll of #19 from above against 8.x-2.x-dev.
    8.x-2.6 just released a few days ago, so patch was incompatible. Also took care of a couple typos while I was in there.

    I agree with #22 that ideally both would be supported in some capacity!

  • Status changed to Needs review almost 2 years ago
  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

    I agree with #22 too
    Testing the changes

  • Status changed to Needs work almost 2 years ago
  • πŸ‡΅πŸ‡ΉPortugal jcnventura

    To be honest, it makes no sense that this module is providing the library for CKEditor FakeObjects β†’ . The composer json of this module should restrict itself to the ckeditor.link plugin, since that is the one it uses directly, even if the fakeobjects plugin must also be installed somehow, but that should be handled by that module. See ✨ Store plugin in libraries/ckeditor.fakeobjects Closed: won't fix .

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @jcnventura is this maybe worth a separate issue? I mean, the fakeobject has been in the code base also before this discussion about the library location started, which is what this issue is about, isn't it?

  • πŸ‡¬πŸ‡§United Kingdom jrsouth

    Tweak to the patch in #23, seemed to miss one instance of ckeditor.link and was causing the library to be found in the filesystem at the new location, but still report the original location.

  • Status changed to RTBC over 1 year ago
  • πŸ‡΅πŸ‡ΉPortugal jcnventura

    Indeed, totally agree with @jurgenhaas on #26.

    In the meantime, tested #27 and all seems working as expected.

  • πŸ‡ΊπŸ‡ΈUnited States agentrickard Georgia (US)

    Bumping. Still works in conjunction with ✨ Store plugin in libraries/ckeditor.fakeobjects Closed: won't fix

  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    Starting with Webform 6.2.0, the Webform module is no longer offer their own version of CKEditor but have switched to using core's editor. This was done so they could support both CKEditor 4 and 5 without having to maintain their own custom versions of both. They have now switched to offering their own editor profiles instead. For more info see #3322552: CKEditor 5 support β†’ .

    That means changing the install paths to match Webform's naming scheme is not a good idea any more, since these are only used in Webform 6.1.x which will be obsolete in 2 weeks when Drupal 9 support is dropped.

    I propose to close this as "Won't fix".

  • Status changed to Closed: won't fix about 1 year ago
  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia
Production build 0.71.5 2024