Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
install system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Dec 2024 at 10:12 UTC
Updated:
20 Feb 2025 at 09:04 UTC
Jump to comment: Most recent
Comments
Comment #2
alexpottThis is happening because Trash has a config listener \Drupal\trash\EventSubscriber\TrashConfigSubscriber::onSave() that is triggered when trash.settings is saved an adds fields to any enabled entity types. At this point the node module has been enabled but is yet to be processed by the loop that processes the entity installations and simple config in config/install.
A core fix could be
Or we could move this to the trash module and use the container_rebuild_required flag.
Comment #4
alexpottComment #5
alexpottThis feels amazing but this has broken \Drupal\FunctionalJavascriptTests\Ajax\AjaxTest::testGlobalEvents() - I wonder how this has broken that and how that test is the only test of something in the module installer!!!!
Comment #6
alexpott#5 turned out to be unrelated - it was caused by a recent commit to HEAD - see #3492582: Replace some of obj && obj.prop with optional chaining
Comment #7
alexpottI've discussed this with @amateescu and we both think that this change is likely to make the move to multi-module install easier as it means that database schema will be correct before any modules start installing config.
Comment #8
alexpottComment #9
alexpottNote that the trash module is now fixed due to #3496091: Improve the way we enable Trash support by default for nodes being committed.
Comment #10
alexpottNote that the trash module is now fixed due to #3496091: Improve the way we enable Trash support by default for nodes being committed.
Comment #11
smustgrave commentedWhat’s a good way to test this one? Or just follow steps to reproduce
Comment #12
smustgrave commentedNW for the tests, but admit I'm not super familiar with the trash module (didn't know of it will this ticket) but wonder if whatever it was doing could be copied in a core test module?
Comment #14
godotislateAdded a test. The test works similarly to how trash does: there is a new test module with event subscriber for saving simple config provided by the module. When node and the test module are installed at the same time, the subscriber sets a flag in keyvalue for whether the node entity field table exists at the time of config save.
Comment #15
smustgrave commentedGoing to lean on the test coverage for this one
Looking at the changes I don't see anything off or needing update.
I'm not sure if this kind of change needs a CR but will let the committers decide.
Will go on a limb.
Comment #17
catchThis looks good, nice that we're finding edge cases with the multi-install this far ahead of the 11.2 release.
Committed/pushed to 11.x, thanks!