Could this module depend on the fakeobjects module rather than include it?

I've already got the 'fakeobjects' module as a dependency, because I'm also using the ckeditor_drupalbreaks module which has it as a dependency. So, it'd be nice to not have this in twice.

The one wrinkle is that the 'fakeobjects' module doesn't include the CKEditor plugin in the module, which adds an extra step to put it in /libraries. But I think not including the plugin is the right thing to do because you need the plugin version to match the CKEditor version, which is different depending on which version of Drupal 8 core you have.

Comments

dsnopek created an issue. See original summary.

rajab natshah’s picture

Totally agree with you David!
CKEditor FakeObjects
I wish that FakeObjects and the Anchor Link comes with Drupal 8 Core CKEditor package.

Drupal.org Library Packaging Whitelist

#2940014: CKEditor Fake Objects

I had created the following issue 7 months ago
#2888309: CKEditor Anchor link

rajab natshah’s picture

Starting a new branch 8.x-2.x to follow with the best practice

rajab natshah’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
rajab natshah’s picture

Title: Depend on fakeobjects module? » Changed to depend on fakeobjects module
Assigned: Unassigned » rajab natshah
rajab natshah’s picture

  • RajabNatshah committed 4a63367 on 8.x-2.x
    Issue #2939895: Changed to depend on fakeobjects module
    
  • RajabNatshah committed 85e5ca7 on 8.x-2.x
    Issue #2939895: Changed to depend on fakeobjects module
    
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Active » Needs review
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

anybody’s picture

Version: 8.x-2.x-dev » 8.x-2.4

Hi @RajabNatshah,

we had the problem on many sites where we upgraded anchor_link that drupal/fakeobjects was missing but composer didn't tell. Later on we had errors in Drupal:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "fakeobjects" plugin does not exist. Valid plugin IDs for Drupal\ckeditor\CKEditorPluginManager are: link, language, internal, drupalimage, drupalimagecaption, stylescombo, drupallink, drupalentity, drupalfontawesome, tokenbrowser in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (Zeile 53 in /web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

So I looked into the composer.json of anchor_link and saw that drupal/anchor link isn't listed there? Do you know why? Perhaps we should reopen the issue and ensure it's required?

Current 8.x-2.4:

{
  "name": "drupal/anchor_link",
  "description": "This plugin module adds the better link dialog and anchor related features to CKEditor in Drupal 8.",
  "type": "drupal-module",
  "homepage": "https://www.drupal.org/project/anchor_link",
  "license": "GPL-2.0-or-later",
  "minimum-stability": "dev",
  "authors": [
    {
      "name": "Vardot",
      "homepage": "https://www.drupal.org/vardot",
      "role": "Maintainer"
    }
  ],
  "support": {
    "issues": "https://www.drupal.org/project/issues/anchor_link",
    "source": "http://cgit.drupalcode.org/anchor_link"
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    }
  ],
  "require": {},
  "extra": {
    "branch-alias": {
      "dev-8.x-2.x": "8.2.x-dev"
    }
  }
}

While it is in 8.x-2.x-dev.

I'm not sure how this could happen. Perhaps a build mistake from drupal.org? I guess we need a new 2.5 release?

karolus’s picture

I'm running into this same issue, and like Anybody have been hit with errors when attempting to edit/create nodes. So, for the moment, it may be good to at least have a patch ready, for users who aren't comfortable with running development versions of a module on the production environments.

anybody’s picture

@RajabNatshah could you perhaps have a look at #12 and reopen this eventually?

rajab natshah’s picture

anybody’s picture

Thank you :)