When updating a site recently, was hit with module errors when attempting to edit a node where CKeditor was used. The reported error is:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "fakeobjects" plugin does not exist. Valid plugin IDs for Drupal\ckeditor\CKEditorPluginManager are: link, drupalimage, internal, stylescombo, drupallink, language, drupalimagecaption, embedsemantic, autolink, embed, embedbase, autoembed, textmatch, notificationaggregator, notification, drupalimagestyle, drupalresponsiveimagestyle, drupalmedia, drupalmedialibrary, tokenbrowser in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

As was posted on the related issue, this is due to the FakeObjects module not being a requirement in the module's composer.json. This is the code snippet from 8.x-2.x-dev under the require:

    "drupal/fakeobjects": "^1.0"

Is there a plan to release an 8.x-2.5 version of the module where this is fixed?

CommentFileSizeAuthor
#8 3187234-fakeobjects-not-installed-8.patch386 bytesberliner

Comments

karolus created an issue. See original summary.

ikeigenwijs’s picture

second that!

timwood’s picture

The module should probably also include an update hook to enable the fakeobject Drupal contrib module as well as adding that as a dependency in anchor_link.info.yml.

sergiur’s picture

Version: 8.x-2.4 » 8.x-2.5

fakeobjects is now downloading fine along with 8.x-2.5, but still needs an update hook to enable fakeobjects module

thomaswalther’s picture

[09-Jun-2021 09:55:59 Europe/Berlin] Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException: "The "fakeobjects" plugin does not exist. Valid plugin IDs for Drupal\ckeditor\CKEditorPluginManager are: link, drupalimage, internal, stylescombo, drupallink, language, drupalimagecaption, drupalfontawesome, imce, splittext" at /webroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 53

I solved this error with the installation of fakeobjects. But before I copied a version to /libraries/fakeobjects/ for a working installation.

For a warning on the status site "WEBFORM: EXTERNAL LIBRARIES", I copied also the same version in /libraries/ckeditor.fakeobjects/

smustgrave’s picture

Not sure if this could help out https://www.drupal.org/project/anchor_link/issues/3204935. we tried to follow the way webform was loading it's libraries.

dasginganinja’s picture

I ran into this issue as well and it turned out that the fakeobjects module needed to be enabled.

+1 for adding this to the info.yml and also needing an update hook

berliner’s picture

Status: Active » Needs review
StatusFileSize
new386 bytes

Attached patch should install the fakeobjects module on existing installations.
Still missing downloading the library, not sure how feasible that actually is in an update hook.

tvalimaa’s picture

#8 helped for me

marc.groth’s picture

Status: Needs review » Reviewed & tested by the community

Thanks berliner! #8 fixes this issue.

thomaswalther’s picture

#8 worked for me.
Patched and activated module drush pm:enable fakeobjects

Thanks berliner!

piotr pakulski’s picture

For version 2.5 it can be easily solved by installing
composer require oomphinc/composer-installers-extender
in cmposer.json

"installer-paths": {
            ...
            "docroot/libraries/{$name}": [
                "type:drupal-library",
                "type:bower-asset",
                "type:npm-asset"
            ]
        },

and then

composer require drupal-ckeditor-libraries-group/link   
composer require drupal-ckeditor-libraries-group/fakeobjects
ajfernandez’s picture

#12 works perfectly for version 2.5!! Thanks Piotr Pakulski!

Please, add these guidelines to the "OPTION #2" section of the module documentation, in the module project page (https://www.drupal.org/project/anchor_link).

Thanks!!

rajab natshah’s picture

Status: Reviewed & tested by the community » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)