- Issue created by @jaydenpearly
- 🇮🇹Italy kopeboy Milan
I can confirm I'm having this error twice now (on two different sites), and it doesn't allow me to change any text format configuration that has CKEditor5 anymore.
Drupal 10.2.6 doesn't have this. This doesn't come out of the box but after playing around with CKEditor toolbar or removing a text format.
- 🇵🇱Poland pingwin_cracow
Confirmed, I have the same problem after updating to Drupal 10.3.0-beta1
Exactly the same errors mentioned above. - 🇵🇱Poland pingwin_cracow
I updated to Drupal 10.3.0 and the problem still persists which is very irritating.
Is there a chance for a quick solution so that I can edit the text format settings? Yes. Performing a
git bisect
on a checkout of Drupal Core between a good and bad release tag will quickly find the issue that introduced the regression.- First commit to issue fork.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
LangcodeRequiredIfTranslatableValues is new in 10.3, added in 🐛 Require `langcode: …` only for simple config that contains translatable values Active .
- Merge request !8526Issue #3449851: LogicException: The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated → (Closed) created by Liam Morland
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
This merge request changes the
LogicException
to aE_USER_DEPRECATED
error. This allows text formats to be saved. - Status changed to Needs review
5 months ago 6:19pm 24 June 2024 - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
This patch represents the current state of the merge request.
- 🇺🇸United States rei
in my case I was getting the same error message after adding ckeditor5_template button on the toolbar.
After applied the patch in #13, the editor doesn't show up/blank at node edit page.
this error did't occur with drupal 10.2.7 - 🇵🇱Poland pingwin_cracow
Drupal 10.3.0
php 8.4
admin theme: Gin
fix #13 worked fine after clearing cache, Ckeditor 5 bar is correct for all options (Full, Office, etc.)I hope the patch will be included in the next Drupal 10.3 patch
Thank you very much for help.
- 🇩🇪Germany vincent.hoehn Dresden, Germany
I can confirm that the patch in #13 fixes the issue. I hope it will be included in core soon!
- Status changed to Needs work
5 months ago 1:48pm 25 June 2024 - 🇺🇸United States smustgrave
Change should be turned to an MR.
Issue summary is incomplete so that should be updated using the standard template.
Have not reviewed patch
- Status changed to Needs review
5 months ago 2:02pm 25 June 2024 - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
The change already is a MR; see #10. #13 is there to allow patching from Composer.
This was intentionally targeting Drupal 10.3 because this is a quick solution to fix broken sites and people will probably want some other fix in 11.x.
Issue summary updated.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
I was anticipating this would deploy with 10.3.1 to fix sites broken by 10.3.0.
- Status changed to Needs work
5 months ago 2:19pm 25 June 2024 - 🇺🇸United States smustgrave
Looking at the steps
On Drupal 10.3, edit and then save a text format
this doesn't cause any issue, would imagine a test failure would of happened if so. So there needs to be determined what the issue is and have coverage for that.
But this missed 10.3 and can't be removed in 11 as that's out now too. So if anything it would be 10.4 and removed in 12 if it gets added.
MR should be made for 11.x (main branch)
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Did you look at the patch? I expect that if this patch were proposed to be merged into Drupal 11 or 12, that would be refused on the basis that the
LogicException
is correct and that the bug is buried elsewhere in the code. That is probably true. What we need now is a fix for the sites that were broken by the 10.3.0 upgrade.The issue only appears when saving a text format that uses CKEditor. It is possible that there is some other condition also required to trigger the problem. Several people are having this problem and the fix works for them.
- Status changed to Needs review
5 months ago 2:41pm 25 June 2024 - 🇺🇸United States smustgrave
Okay I'm going to leave this issue, I don't believe its going to be merged but will leave in review for others
- Status changed to Needs work
5 months ago 2:45pm 25 June 2024 - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Do you have another suggestion for how to fix this?
If this cannot be quickly fixed, there should be a warning message to caution people against upgrading to Drupal 10.3.
- 🇺🇸United States smustgrave
I mean the exception is very vague, I imagine the scenario is that some config got in after 🐛 Require `langcode: …` only for simple config that contains translatable values Active so would be more useful to say what config is causing the issue. Then you could go and fix the file.
But that's an untested theory
- Status changed to Needs review
5 months ago 2:52pm 25 June 2024 - 🇺🇸United States smustgrave
Opened this yesterday too as I saw it with configuration inspector.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
We are not using
config_inspector
and yet we see this error. So, my hunch is that the other issue should be closed as a duplicate of this. Perhaps the error message should point out what config is wrong, as you suggest in the other issue. - 🇮🇳India Shani Maurya Mumbai
I can confirm that the patch in #13 fixes the issue for drupal core 10.3
- Status changed to RTBC
5 months ago 3:35pm 1 July 2024 Patch #13 works in Drupal 10.3. (I don't use config_inspector either.)
- 🇨🇦Canada dadderley Vancouver
Same problem with 10.3.0
Cannot modify existing text format @dadderley If you still have a problem in 10.3, then your text format is using an invalid CKEditor plugin. I had the same problem, too, prior to discovering that.
- 🇳🇿New Zealand quietone
The title becomes the commit message and an error message is not very useful when going through the logs. Can someone change this to what is being fixed?
- 🇨🇦Canada dadderley Vancouver
@solideogloria
I have a few sites that have been updated to D 10.3.0This is happening in sites that use this plugin
Obfuscate Email
https://www.drupal.org/project/obfuscate_email →This is a new issue with the plugin that is related to the D 10.3.0 upgrade
https://www.drupal.org/project/obfuscate_email/issues/3457393 🐛 Errors when trying to create a new Text Format with CkEditor5 Editor ActiveI cannot uninstall the plugin because a text format requires it.
I cannot disable the plugin because it throws this error when trying to save the text format.Error message
'click' is not a supported key.
'click_label' is not a supported key.Interestingly enough on one of the updated sites where I have the Obfuscate Email plugin installed, I don't get the error message, just a WSOD when I try to save the text format.
Is this helpful information?
If you still have the issue, try setting a breakpoint in the code where the error is thrown from. You might have another plugin throwing errors.
- 🇨🇦Canada dadderley Vancouver
@solideogloria
I found the offending Ckeditor plugin.
Thanks again.See this issue
Symfony\Component\Validator\Exception\LogicException: The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated.
https://www.drupal.org/project/ckeditor_indentblock/issues/3457094 🐛 Symfony\Component\Validator\Exception\LogicException: The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated. Active - 🇬🇧United Kingdom alexpott 🇪🇺🌍
This error indicates that
type: config_object
has been added in an incorrect place in the schema. I agree that the friendly thing to do here is to emit a deprecation in 10.x and leave a break in 11.x as this is not a great thing. The config that has config_object placed at the wrong level will be invalid according to its schema. - Status changed to Needs work
5 months ago 1:25pm 7 July 2024 - 🇬🇧United Kingdom catch
Not sure what's best to do about the change record here, should we add a new CR alongside the ones that were already added for [#3427629]?
I think deprecation in 10.3 to exception in 11.x is OK given the config schema was invalid in these modules already.
- 🇬🇧United Kingdom catch
Made an attempt at a CR https://www.drupal.org/node/3459863 →
- Status changed to Needs review
5 months ago 10:09am 8 July 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
I've fixed the 10.3.x MR and I've provided an 11.x that improves the exception message so it is less cryptic. The deprecation message for 10.x is also explicit now too.
- 🇺🇸United States smustgrave
smustgrave → changed the visibility of the branch 11.x to hidden.
- 🇺🇸United States smustgrave
smustgrave → changed the visibility of the branch 10.3.x to hidden.
- Status changed to RTBC
5 months ago 2:08pm 8 July 2024 - 🇺🇸United States smustgrave
Had to run the tests locally since can't run the test-only feature here
Failed asserting that exception message 'The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated.' contains 'The LangcodeRequiredIfTranslatableValues constraint is applied to 'config_test.foo::broken_langcode_required'. This constraint can only operate on the root object being validated.'.
Love the updated text, super helpful
- 🇬🇧United Kingdom catch
Committed/pushed to 11.x, 11.0.x, 10.4.x and 10.3.x respectively, thanks!
- Status changed to Fixed
5 months ago 2:54pm 8 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.