Problem/Motivation

Warning: Undefined array key "user" in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 101 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Trying to access array offset on null in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 101 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Undefined array key "user" in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 110 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Trying to access array offset on null in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 110 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Undefined array key "user" in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 125 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Trying to access array offset on null in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 125 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Undefined array key "user" in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 138 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Trying to access array offset on null in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 138 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Undefined array key "user" in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 151 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Warning: Trying to access array offset on null in Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->buildConfigurationForm() (line 151 of modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php).

Steps to reproduce

Visit /admin/config/content/formats/manage/full_html

Proposed resolution

The reason is, that

$this->mentionsPluginManager->getAllMentionsTypes()

lists ALL plugins, e.g.

  • user
  • node

as keys, but even after saving the form, the settings don't contain all of them:
$settings = $this->configuration
e.g. in our case only contains

  • node

which should also be fine! Maybe this is even erased after saving the form with only one (or none) type?

Remaining tasks

User interface changes

API changes

Data model changes

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

anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

Issue summary: View changes

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

grevil’s picture

Assigned: grevil » Unassigned
Status: Active » Needs review

Fixed, please review!

grevil’s picture

Alright, that should be it! The additional "image" module and its dependency "file" was added, because the user mentions type (which is mainly tested here) uses "image_style". The dependency already exists on the module itself.

I'll add some CkeditorMentionsNodeTests in the test issue.

anybody’s picture

Status: Needs review » Reviewed & tested by the community
anybody’s picture

Status: Reviewed & tested by the community » Fixed

PERFECT!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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