To be in line with the very famous webform module, it would be great to store the plugin in the same directory as they do in order to require that plugin only once. I'll provide a MR for this.

CommentFileSizeAuthor
#18 fakeobjects-n3208959-18.patch1.8 KBdamienmckenna
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

Status: Active » Needs review
smustgrave’s picture

This would be fantastic! Sucks having to have 2 copies of the same library!

jurgenhaas’s picture

occupant’s picture

@jurgenhaas Can this be added as a patch to this issue so that it can be tested?

jurgenhaas’s picture

@occupant not sure what you mean. The MR can be tested and replaces the patch based workflow completely. What are you looking for? The patch file of the MR is linked above, look for "plain diff" which is a link to the patch file.

Because the change is also affecting the composer.json file, testing is only possible with an MR and not with a patch. You need to add certain things into your project's composer.json file so that your composer update calls for the MR version and not the dev version of the module. I have a code snippet documented here which is for a different module, but you can adjust that for this MR too.

occupant’s picture

@jurgenhaas

Oh, nice, how have I not noticed the plain diff before! That's fantastic.

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

The patch works for me in combination with the Anchor_Link patch/MR. Thanks Jurgen!

voleger’s picture

jcnventura made their first commit to this issue’s fork.

jcnventura’s picture

Undid the composer.json changes from #4. The installer-name change doesn't work in the module's composer.json, and can only be applied to a composer.libraries.json that this project does not have.

kevinquillen’s picture

What is the path forward here? I just ran into a problem on a site that has Webform on it. Webform defines the plugin as such in its module:

        "ckeditor.fakeobjects": {
            "type": "package",
            "package": {
                "name": "ckeditor/fakeobjects",
                "version": "4.16.2",
                "type": "drupal-library",
                "extra": {
                    "installer-name": "ckeditor.fakeobjects"
                },
                "dist": {
                    "url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.16.2.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        },

This is causing the library to be downloaded at 'ckeditor.fakeobjects' which this module is not looking for.

jcnventura’s picture

@kevinquillen, the MR in this issue changes the install location to "ckeditor.fakeobjects", so if you use Webform's composer.libraries.json this module should find it at the right location. However, it would be good to maybe also provide a composer.libraries.json in this module.

Note however that this solution is not compatible with the MR in #3118327: drupal-ckeditor-libraries-group composer installation support, which uses the existing location. That MR will install the fakeobjects library via composer without the need to maintain a composer.libraries.json.

Possibly the best would be to support the library in both locations.

grumpydev74’s picture

I agree, the location used by webform "ckeditor.fakeobjects" is also the same used by the module anchor link, which making the Fakeobjects module unrelevant with that path.

@kevinquillen, the module should handle both locations as suggested by @jcnventura OR alignes with the others module to have a consistency with other contrib modules libraries definitions.

A a workaround, for now, I run a command in the composer post install/update and copy folder from libraries/ckeditor.fakeobjects to libraries/fakeobject.

Regards

damienmckenna’s picture

I think this should be reworked to support both paths, to avoid breaking existing sites, and recommend using the same path as Webform uses.

damienmckenna’s picture

StatusFileSize
new1.8 KB

This is the merge request in patch format.

agentrickard’s picture

pfrenssen’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Webform dropped their own version of CKEditor in the 6.2.x branch and are now 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 Webform's old location not a good idea any more, since this location is going to fall out of use once Webform 6.1.x is obsolete (which will happen in 2 weeks when Drupal 9 support is dropped).

Closing as "Won't fix" since this doesn't make sense any more.