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.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | fakeobjects-n3208959-18.patch | 1.8 KB | damienmckenna |
Issue fork fakeobjects-3208959
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
Comment #3
jurgenhaasComment #4
smustgrave commentedThis would be fantastic! Sucks having to have 2 copies of the same library!
Comment #5
jurgenhaasAlso added the installer name, similar to #3204935: Adjust composer.libraries.json to match webform standards and prevent webform issues
Comment #6
occupant@jurgenhaas Can this be added as a patch to this issue so that it can be tested?
Comment #7
jurgenhaas@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 updatecalls 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.Comment #8
occupant@jurgenhaas
Oh, nice, how have I not noticed the plain diff before! That's fantastic.
Comment #9
damienmckennaComment #10
damienmckennaThe patch works for me in combination with the Anchor_Link patch/MR. Thanks Jurgen!
Comment #11
volegerComment #13
jcnventuraUndid 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.
Comment #14
kevinquillen commentedWhat 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:
This is causing the library to be downloaded at 'ckeditor.fakeobjects' which this module is not looking for.
Comment #15
jcnventura@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.
Comment #16
grumpydev74I 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
Comment #17
damienmckennaI think this should be reworked to support both paths, to avoid breaking existing sites, and recommend using the same path as Webform uses.
Comment #18
damienmckennaThis is the merge request in patch format.
Comment #19
agentrickardStill works. Recommended to merge in tandem with #3204935: Adjust composer.libraries.json to match webform standards and prevent webform issues
Comment #20
pfrenssenWebform 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.