Closed (fixed)
Project:
Drupal Canvas
Version:
1.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Dec 2025 at 07:41 UTC
Updated:
2 Mar 2026 at 15:25 UTC
Jump to comment: Most recent
Comments
Comment #2
effulgentsia commentedComment #3
wim leersA lot fails.
Comment #6
wim leersIn the MR, it's currently manually.
(Daily CI job is possible, but not in this MR: it's a GitLab CI project setting: "scheduled pipelines".)
Comment #7
wim leers#3560831: Update Canvas' CKEditor 5 config to allow using the native <ol type> vs <ul type> picker is already fixing an 11.3-specific failure.
Comment #8
wim leersSeems like there's also many
label_displayblock plugin setting related failures. I don't see a CR for that: https://www.drupal.org/list-changes/drupal/published?keywords_descriptio... 🤔Comment #9
wim leersComment #10
wim leersAdded #3562100: Remove usages of code deprecated in Symfony 7.4.
Comment #11
wim leersLooks like https://www.drupal.org/project/gitlab_templates just bumped the default from 11.2.8 to 11.3.1.
Which means Canvas' CI is now failing, HARD. Every in-progress MR is impacted.
(One hour ago, https://git.drupalcode.org/project/canvas/-/merge_requests/433/pipelines was passing, now it's failing across the board!)
EDIT: per https://git.drupalcode.org/project/gitlab_templates/-/commit/b935cd1f71d..., see #3563698: Drupal 11.3 and 10.6 are released - update variant variables, which shipped in https://git.drupalcode.org/project/gitlab_templates/-/commits/1.13.0?ref... ~1 hour ago 😬
Comment #12
wim leers⚠️ Note that we MUST continue to test 11.2. Canvas 1.x has 11.2 as the minimum, so it must continue to be tested.
It's probably best to change Canvas' CI to continue to inherit upstream changes (even though they broke here today, obviously). For now, the work-around I recommend is using https://project.pages.drupalcode.org/gitlab_templates/info/templates-ver..., like so: https://git.drupalcode.org/project/canvas/-/merge_requests/433/diffs?com...
Comment #15
phenaproximaApproved !449. It's a band-aid, but it gets us unblocked to achieve the actual objective of this issue.
Comment #17
phenaproximaGonna try to push this forward per Wim's request.
Comment #18
wim leersNice progress here, @phenaproxima!
Fascinating that #3547808: label_display block configuration value should not be translatable is so far responsible for the bulk of the changes.
Comment #19
phenaproximaAdding a related issue in core which broke some assertions of specific exception messages (these really should be using
assertStringContainsString()for future proofing).Comment #20
phenaproximahttps://www.drupal.org/node/3539877 is the reason why some kernel tests now need new dependencies.
Comment #21
wim leersAFAICT #3571992: CI: Add "deprecations (php)" job that fails if deprecation count exceeds some threshold, to force chasing upstream PHP deprecations (and generate novice issues!) is impossible to solve until this is done, see #3571992-8: CI: Add "deprecations (php)" job that fails if deprecation count exceeds some threshold, to force chasing upstream PHP deprecations (and generate novice issues!). So much pain, induced by Symfony 🫠
Comment #22
wim leers#20: AFAICT #3563216: Add a base class for kernel tests to improve DX: `CanvasKernelTestBase` would help make achieving that a lot simpler, because then this MR has to update fewer files?
Comment #23
phenaproximaI am stuck on the last failing test, which is the very tricky
\Drupal\Tests\canvas\Kernel\Plugin\Canvas\ComponentSource\ComponentInputsEvolutionTest.I decided to take it one test case at a time, so I started with
testBlockPluginUpdateConsequences().Running this test on 11.3, the first failing assertions are these:
And they are easy to fix. The hash is hard-coded for 11.2, but it's different in 11.3. Refactoring to this gets us moving again:
Onward! The next failing assertions are:
And changing that to this, gets us going again:
Chugging along here.
But then I hit a wall. I can't get past this assertion this assertion (sorry for the length):
Specifically, that
active_versionviolation, which fails thusly (massaged a bit for clarity):The hashes have changed. That's expected, of course, but hear me out...
The first hash mismatch is straightforward; I just have to replace
7cc894b85e93a7d8with$before_version.But that second hash,
ec03b64ff4f992b9-- where the hell is that coming from? I can't figure it out! It's not the before version, it's not the after version, and if I switch the codebase back to 11.2, it's still not the before or after versions. I can't even generate this hash if I duplicate the logic that does the validation (\Drupal\canvas\Entity\Component::validateActiveVersion()) -- regardless of whether I'm on 11.2 or 11.3.It's opaque to me. If can't figure out how this hash is generated, I have no hope of figuring out how to update the assertion properly.
Can anyone give me some guidance?
Comment #24
penyaskitore: #23:
Ended up hard-coding versions for 11.2 and 11.3, and using
matchso a potential change again for 11.4 is accommodated if we end up supporting 3 core versions.So we have 2 different hashes, before and after, and those depend on the config schema. I think that's what Adam was missing.
#3567413: When editing a Canvas entity with a component tree (e.g., page, template, or region), automatically upgrade component instance versions for cases where there's no impact on existing data didn't cover blocks, because that's blocked on core's #3521221: Block plugins need to be able to update their settings in multiple different storage implementations. But when config schema changes for blocks are released, there won't be a plugin update even after that (e.g. a new constraint alters the hash, but doesn't change the underlying block data, so no upgrade will exist). Wondering if we should cover that, and HOW 🤯? As is, component instances won't be able to auto-upgrade in that case. That's definitely out of scope here anyway.
Comment #25
penyaskitoAfter a painful merge, this is up-to-date with HEAD as of now.
This will be conflicting all the time, so let's try to merge this ASAP.
11.3 test failures are not blocking as is. I'd suggest we run them on every MR, or find a different way to ensure we add
#[RunTestsInSeparateProcesses]. If not, I foresee this will be constantly missing and the test-run will never be green.Comment #26
wim leersComment #27
wim leersAFAICT ~80% of the pain here is caused by
but that's exactly what https://git.drupalcode.org/project/experience_builder/-/merge_requests/1... fixed back in June for Canvas' #3528159: Ensure deterministic version hashes for ComponentSource-specific settings, thanks to config schema-powered normalization, and which core will eventually fix in #2544708: The `label_display` setting in `type: block_settings` has the wrong config schema type: then it will actually change to booleans, as you'd expect.
I'm surprised that in so many places we got away with not being strictly compliant with that. Did we figure out yet what change in 11.3 caused the need for all this to change?
Comment #28
wim leersDiscussed with @penyaskito, and there is one upstream change that is causing the component versions to change, even if we had not gotten #27 wrong in Canvas:
→ this causes
\Drupal\canvas\ComponentSource\ComponentSourceBase::generateVersionHash()to generate a different version hash, even iflabel_displayhad been set to'0', because:👆 That uses the component source plugin-specific schema definitions — for SDCs that's JSON schema per prop, for block plugins that's the block plugin's settings' config schema.
Comment #29
wim leersHaving investigated #27 + #28, I think this points to 2 larger systemic issues in Canvas:
\Drupal\Tests\canvas\Kernel\Plugin\Canvas\ComponentSource\BlockComponentTest::testGetExplicitInput(),CanvasTestSetup, etc.blockComponentSource plugin goes through great pains to hidelabelandlabel_displayfrom Canvas users, but then 1) actually goes back and restores it just prior to saving, 2) doesn't actually validate these UNLESS there's other block plugin settings.It also means pointless data ends up being stored:
⇒ Note the
"label":"Site branding","label_display":"0"bit in there, that is the default block label (the block plugin label!) and the default value forlabel_display). Why even store that at all, for every single block component instance, if we don't allow configuring it?! Why not just omit it altogether and restore it just-in-time?→ Needs follow-up to address both. But we shouldn't block this issue on it.
Comment #30
wim leers#29.1 → #3572847: Add missing validation to component trees being saved into content entities in tests— and simplify `CanvasTestSetup`
#29.2 → #3572850: "block" ComponentSource plugin should never store inputs for `label` and `label_display`, because they're not available for Canvas users
Comment #31
wim leersThanks for the epic work on this, @phenaproxima! 🙏💙👏 And thanks @penyaskito for that final bit, and the nudge to prioritize this over everything else.
Review
150 files, +764, −230with most of those files being changed being trivial and forced upon us by upstream (PHPUnit)/srcchanges are to comply with upstream Symfony changes — CR: https://www.drupal.org/node/3554746. That will make this MR help #3571992: CI: Add "deprecations (php)" job that fails if deprecation count exceeds some threshold, to force chasing upstream PHP deprecations (and generate novice issues!) a lot — and that in turn should ensure we won't quite need repeats of this epic endeavour!phpunit (>11.2-only features)CI job and instead made thephpunit (11.3)CI job run always, similar to the existingphpunitCI job (which doesn't say but tests 11.2 aka Canvas' minimum core requirement).⇒ Auto-merge queued:
🚢
Comment #33
wim leersComment #35
wim leersHah, just one day later, and an upstream change already caused a failing 11.3 CI job:
— https://git.drupalcode.org/project/canvas/-/jobs/8470490#L2479
Why? Because this is targeting
11.3.x-dev, rather than a concrete tag:Let's target a specific 11.3 release to avoid this.
Comment #36
wim leersLikely cause: #3554220: Claro's libraries don't enforce the variables.css dependency's https://git.drupalcode.org/project/drupal/-/commit/a2ac2dc82289864c7cc29...
Comment #39
wim leers#3573473: Fix HEAD fixed #35, but @isholgueras' MR is doing the last bit of #35 — thanks!
Comment #41
wim leers