Problem/Motivation

I always get this warning.
Any idea, please.. Thanks

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

Details

#0 /home/pearl/public_html/d11test/web/core/includes/bootstrap.inc(104): _drupal_error_handler_real()
#1 /home/pearl/public_html/d11test/web/modules/contrib/ckeditor_mentions/src/Plugin/CKEditor5Plugin/Mentions.php(258): _drupal_error_handler()
#2 /home/pearl/public_html/d11test/web/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php(323): Drupal\ckeditor_mentions\Plugin\CKEditor5Plugin\Mentions->getDynamicPluginConfig()
#3 /home/pearl/public_html/d11test/web/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php(920): Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getCKEditor5PluginConfig()
#4 /home/pearl/public_html/d11test/web/core/modules/editor/src/Plugin/EditorManager.php(90): Drupal\ckeditor5\Plugin\Editor\CKEditor5->getJSSettings()
#5 /home/pearl/public_html/d11test/web/core/modules/editor/src/Element.php(102): Drupal\editor\Plugin\EditorManager->getAttachments()
#6 [internal function]: Drupal\editor\Element->preRenderTextFormat()
#7 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(107): call_user_func_array()
#8 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(876): Drupal\Core\Render\Renderer->doTrustedCallback()
#9 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(438): Drupal\Core\Render\Renderer->doCallback()
#10 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(227): Drupal\Core\Render\Renderer->doRender()
#11 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Template/TwigExtension.php(491): Drupal\Core\Render\Renderer->render()
#12 /home/pearl/public_html/d11test/vendor/twig/twig/src/Environment.php(420) : eval()'d code(82): Drupal\Core\Template\TwigExtension->escapeFilter()
#13 /home/pearl/public_html/d11test/vendor/twig/twig/src/Template.php(402): __TwigTemplate_8ceedef56065c336b3e5d71e6ccf10e1->doDisplay()
#14 /home/pearl/public_html/d11test/vendor/twig/twig/src/Template.php(358): Twig\Template->yield()
#15 /home/pearl/public_html/d11test/vendor/twig/twig/src/Template.php(373): Twig\Template->display()
#16 /home/pearl/public_html/d11test/vendor/twig/twig/src/TemplateWrapper.php(51): Twig\Template->render()
#17 /home/pearl/public_html/d11test/web/core/themes/engines/twig/twig.engine(34): Twig\TemplateWrapper->render()
#18 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Theme/ThemeManager.php(380): twig_render_template()
#19 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(497): Drupal\Core\Theme\ThemeManager->render()
#20 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(510): Drupal\Core\Render\Renderer->doRender()
#21 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(510): Drupal\Core\Render\Renderer->doRender()
#22 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(250): Drupal\Core\Render\Renderer->doRender()
#23 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(141): Drupal\Core\Render\Renderer->doRenderRoot()
#24 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#25 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext()
#26 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(167): Drupal\Core\Render\Renderer->renderInIsolation()
#27 /home/pearl/public_html/d11test/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRenderPlaceholder()
#28 /home/pearl/public_html/d11test/web/core/modules/big_pipe/src/Render/BigPipe.php(730): Drupal\Core\Render\Renderer->renderPlaceholder()
#29 /home/pearl/public_html/d11test/web/core/modules/big_pipe/src/Render/BigPipe.php(500): Drupal\big_pipe\Render\BigPipe->renderPlaceholder()
#30 [internal function]: Drupal\big_pipe\Render\BigPipe->Drupal\big_pipe\Render\{closure}()
#31 /home/pearl/public_html/d11test/web/core/modules/big_pipe/src/Render/BigPipe.php(507): Fiber->start()
#32 /home/pearl/public_html/d11test/web/core/modules/big_pipe/src/Render/BigPipe.php(256): Drupal\big_pipe\Render\BigPipe->sendPlaceholders()
#33 /home/pearl/public_html/d11test/web/core/modules/big_pipe/src/Render/BigPipeResponse.php(116): Drupal\big_pipe\Render\BigPipe->sendContent()
#34 /home/pearl/public_html/d11test/vendor/symfony/http-foundation/Response.php(397): Drupal\big_pipe\Render\BigPipeResponse->sendContent()
#35 /home/pearl/public_html/d11test/web/index.php(20): Symfony\Component\HttpFoundation\Response->send()
#36 {main}
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

pearls created an issue. See original summary.

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

vinodhini.e’s picture

Hi, Could you please provide the exact steps to replicate this issue?

I tried the basic setup and configuration of the CKEditor Mentions module locally, but I was not able to reproduce the warning. I enabled mentions for the text format, configured the marker and bundle options, and tested by creating and editing content — but the issue didn’t occur.

Please share the detailed steps or specific configuration that triggers the warning, so we can verify. Thanks.

adevms’s picture

I had the same error when trying to add/edit a content.
Attached a patch that just handles the undefined array key.

arantxio’s picture

I can confirm that this also happens on our site.
I also already checked the merge request and this seems to solve the issue for us.

pearls’s picture

Status: Active » Reviewed & tested by the community

I encounter this issue when creating or editing a content. I also experienced it when writing a comment.

MR!41 worked for me. Thanks @adevms

anybody’s picture

Category: Support request » Bug report

Confirming RTBC

anybody’s picture

Assigned: Unassigned » grevil
grevil’s picture

Title: Undefined array key "removeMarker" » Mentions plugin is missing default configuration, leading to: "Undefined array key exceptions"

grevil changed the visibility of the branch 3.0.x to hidden.

grevil’s picture

Status: Reviewed & tested by the community » Needs work

grevil’s picture

Assigned: grevil » anybody
Status: Needs work » Needs review

Alright, that's it. Please review!

I tested the update hook and it works as expected!

anybody’s picture

Assigned: anybody » Unassigned
anybody’s picture

@pearls, @adevms, @arantxio would be great if you could give this a try and community-review.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Confirming this fixes the issues perfectly fine!

anybody’s picture

Status: Reviewed & tested by the community » Fixed

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.

  • anybody committed 6d47f50e on 3.0.x authored by grevil
    feat: #3557045 Mentions plugin is missing default configuration, leading...
anybody’s picture

Status: Fixed » Closed (fixed)

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