- Issue created by @wim leers
- Assigned to wim leers
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Tightening this validator should make
\Drupal\Tests\standard\Functional\StandardTest
fail.Which in turn should require us to write the missing update path hook.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This blocks ✨ [upstream] Use CKEditor 5's native and UX Needs work .
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Turns out this is caused by:
// If the entirety (so not just the tag but also the attributes, and not // just some of the attribute values, but all of them) of the HTML // elements being configured to be edited via the Source Editing plugin // is supported by a CKEditor 5 plugin, complain. But if some attribute // or some attribute value is still not yet supported, do not generate a // violation message. // If there is overlap, but some attribute/attribute value is still not // supported, exit this iteration without generating a violation // message. Essentially: when assessing a particular value // (for example `<foo bar baz>`), only CKEditor 5 plugins providing an // exact match (`<foo bar baz>`) or a superset (`<foo bar baz qux>`) can // trigger a violation, not subsets (`<foo bar>`). if ($is_attr_overlap && !$source_enabled_element->diff($overlap)->allowsNothing()) { continue; }
This was introduced by #3260857: Expand SourceEditingRedundantTagsConstraintValidator to also check attributes and attribute values → .
- last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago 540 pass, 1 fail - last update
about 1 year ago 30,319 pass, 66 fail - last update
about 1 year ago 30,362 pass, 4 fail - last update
about 1 year ago 30,438 pass - last update
about 1 year ago Custom Commands Failed - Issue was unassigned.
- Status changed to Needs review
about 1 year ago 11:43am 26 October 2023 - last update
about 1 year ago 30,441 pass - 🇺🇸United States smustgrave
Running the test-only feature
But @wim leers left 1 question and 1 nitpicky.
LEaving in review.
- last update
about 1 year ago 30,441 pass - Assigned to wim leers
- Status changed to Needs work
about 1 year ago 1:19pm 26 October 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Just realized something:
\Drupal\ckeditor5\Plugin\CKEditor4To5Upgrade\Core::computeCKEditor5PluginSubsetConfiguration()
'scase 'ckeditor5_list':
should also be updated. - Issue was unassigned.
- Status changed to Needs review
about 1 year ago 8:15am 27 October 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Oops, #9 was meant to be posted on ✨ [upstream] Use CKEditor 5's native and UX Needs work 😅
- Status changed to RTBC
about 1 year ago 3:21pm 27 October 2023 - 🇺🇸United States smustgrave
I was actually confused for a second haha.
Test-only feature failed as expected.
Post_update ran without issue on a standard profile.
So think this is good.
- last update
about 1 year ago 30,467 pass - last update
about 1 year ago 30,484 pass - last update
about 1 year ago 30,486 pass - Assigned to wim leers
- Status changed to Needs work
about 1 year ago 3:04pm 3 November 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
📌 [upstream] Update CKEditor 5 to 40.0.0 Needs review landed, this needs a rebase & conflict resolution.
- Status changed to Needs review
about 1 year ago 2:11pm 8 November 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Hoping @smustgrave can review this one more time — found a pretty big bug during rebasing 😅
- Issue was unassigned.
- 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
There is a failure in the tests, but it looks like that is unrelated and I'm not sure how to rerun tests with gitlab, this looks rtbc imho
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Retesting — Nightwatch & Functional JS have been a bit flakey this week…
- Status changed to RTBC
about 1 year ago 4:10pm 8 November 2023 - 🇺🇸United States smustgrave
Retesting — Nightwatch & Functional JS have been a bit flakey this week…
Extremely flakey!
Also agree this looks good!
- last update
about 1 year ago 30,513 pass - Status changed to Needs work
about 1 year ago 4:36pm 8 November 2023 - Assigned to wim leers
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Thanks to @lauriii, a new edge case has been found: because
SourceEditingRedundantTagsConstraintValidator
was originally designed to handle tags, this code made sense:// An array of tags enabled by every plugin other than Source Editing. $enabled_plugin_elements = new HTMLRestrictions($this->pluginManager->getProvidedElements(array_keys($other_enabled_plugins), $text_editor, FALSE)); $disabled_plugin_elements = new HTMLRestrictions($this->pluginManager->getProvidedElements(array_keys($enableable_disabled_plugins), $text_editor, FALSE)); $enabled_plugin_plain_tags = new HTMLRestrictions($this->pluginManager->getProvidedElements(array_keys($other_enabled_plugins), $text_editor, FALSE, TRUE)); $disabled_plugin_plain_tags = new HTMLRestrictions($this->pluginManager->getProvidedElements(array_keys($enableable_disabled_plugins), $text_editor, FALSE, TRUE));
However … in the case of plugins with optional additional attributes, the above will result for
'settings' => [ 'toolbar' => [ 'items' => [ 'numberedList', 'sourceEditing', ], ], 'plugins' => [ 'ckeditor5_list' => [ 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, ], 'multiBlock' => TRUE, ], 'ckeditor5_sourceEditing' => [ 'allowed_tags' => [ '<ol start type>', ], ], ],
in concluding that for the enabled
ckeditor5_list
plugin, the following things can be generated:<ul> <ol> <li>
… because of'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, ],
IOW: what's missing here is what additional attributes could be generated by enabling optional settings! 🐣
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Now Umami tests fail 👍 https://git.drupalcode.org/issue/drupal-3396628/-/pipelines/47417/test_r...
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 3:32pm 10 November 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Fixing Umami's
editor
config nicely triggered a validation error in the correspondingfilter_format
config:Drupal\Tests\demo_umami\Functional\DemoUmamiProfileTest::testConfig Failed asserting that two arrays are identical. --- Expected +++ Actual @@ @@ -Array &0 () +Array &0 ( + 0 => 'The CKEditor 5 "<em class="placeholder">Media</em>" plugin's "<em class="placeholder">Allow the user to override the default view mode</em>" setting should be in sync with the "<em class="placeholder">Embed media</em>" filter's "<em class="placeholder">View modes selectable in the "Edit media" dialog</em>" setting: when checked, two or more view modes must be allowed by the filter.' +)
👍
Fixed that too now — ready for review again, and WHAT A GREAT FIND from @lauriii 👏
- Status changed to RTBC
about 1 year ago 11:42pm 10 November 2023 - 🇺🇸United States smustgrave
Threads appear to be answered and pipeline showing green. No randoms this time!
- last update
about 1 year ago 30,519 pass - last update
about 1 year ago 30,523 pass 52:48 51:40 Running- last update
12 months ago 30,563 pass - Status changed to Needs work
12 months ago 1:34pm 17 November 2023 - 🇺🇸United States xjm
Reposting my question from Slack: Does the upgrade path work from both Drupal 9 and CKE4 as well as from CKE5/Drupal 10 content getting updated a second time? Moving the fix to presave would also help with that aspect, but it still needs its own consideration since the source data formats from the two versions would be different.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
- Status changed to RTBC
12 months ago 2:11pm 28 November 2023 - 🇬🇧United Kingdom longwave UK
This change involves an upgrade path but the update is small, self-contained, has no BC concerns that I can see, and fixes a major bug, therefore I think the impact outweighs the disruption and therefore this can be committed during the beta phase of 10.2.0. It's also nice that we found and fixed extra config validation violations here!
Committed and pushed bcf5a9159e to 11.x and ec24a58c6d to 10.2.x. Thanks!
-
longwave →
committed ec24a58c on 10.2.x
Issue #3396628 by Wim Leers, smustgrave, lauriii, xjm, catch: Fix...
-
longwave →
committed ec24a58c on 10.2.x
- Status changed to Fixed
12 months ago 10:30pm 28 November 2023 -
longwave →
committed bcf5a915 on 11.x
Issue #3396628 by Wim Leers, smustgrave, lauriii, xjm, catch: Fix...
-
longwave →
committed bcf5a915 on 11.x
- 🇬🇧United Kingdom catch
I think the rule is: for all config entities, always
Yes, this is correct :) Anything that could be in the database but also potentially in config shipped with a module.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States joshuami Portland, OR
joshuami → changed the visibility of the branch 3396628-tighten-sourceeditingredundanttagsconstraintvalidator to hidden.