Problem/Motivation

When I try to save my WYSIWYG text format, I get this error:
The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated. in Drupal\Core\Config\Plugin\Validation\Constraint\LangcodeRequiredIfTranslatableValuesConstraintValidator->validate()

The mentions tab doesn't even need to have to be enabled, simply saving throws this error.

  • Drupal 10.3.1
  • Module version: 3.0.0-beta2

Weird thing: when I set up the module via simplytest.me, it works like a charm.

Steps to reproduce

  1. Install module
  2. Edit WYSIWYG text format where ckeditor is enabled
  3. Hit save
  4. See error
  5. Try again and add the mentions configuration for eg. User entities
  6. Hit save again
  7. See same error

Proposed resolution

Make it work.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 ckeditor_mentions_3503532-2.patch390 bytesblacksnipe
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

blacksnipe created an issue. See original summary.

blacksnipe’s picture

StatusFileSize
new390 bytes

In my research for a fix, I've stumbled across issue #3457094 and tried the same fix. Works like a charm.

I've added a patch, for people that might come across this error with ckeditor_mentions too.

blacksnipe’s picture

Status: Active » Needs review
pearls’s picture

I have the same issue. Thanks to @blacksnipe . #2 patch solved the problem.

+1 for RTBC

pearls’s picture

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

I've faced the same issue and #2 patch resolved it. Thanks!

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

scott_euser’s picture

dinazaur’s picture

Category: Bug report » Feature request
Status: Reviewed & tested by the community » Fixed

Thank you for you work, we already merged this fix in #3480896: Drupal 11 compatibility fixes so no need to merge it here.

Status: Fixed » Closed (fixed)

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