- Issue created by @szeidler
- Status changed to Needs review
over 1 year ago 11:05am 11 July 2023 - last update
over 1 year ago 223 pass - 🇩🇪Germany szeidler Berlin
Here's a workaround for the issue that just skips all entity types that do not have bundles.
- First commit to issue fork.
- 🇬🇧United Kingdom jonathan1055
Thanks for reporting this szeidler, and for doing the debugging and providing the precise cause. Just for my info, did you find this problem when upgrading to Scheduler 2.0.0 from 8.x-1.n or have you upgraded from an earlier 2.x version?
- last update
over 1 year ago 223 pass - @jonathan1055 opened merge request.
- 🇩🇪Germany szeidler Berlin
The sites affected, have been based upon Thunder, so went the whole way from 8.x-1.x to 2.0.0
- 🇬🇧United Kingdom jonathan1055
Thanks. This was added the most recent commit before 2.0.0 on 🐛 entityRevert breaks config:import if there are entity types that do not have a bundle class Fixed
I'd be happy to commit this, and then release 2.0.1 as it seems quite a major error. - last update
over 1 year ago 223 pass - 🇩🇪Germany szeidler Berlin
I just noticed that it actually is influenced by another pending entity update. So in my use-case there was a pending entity update on that
mailchimp_campaign
entity type (which has no bundles) and since in Scheduler we retrieve all pending entity updates$entityUpdateManager = \Drupal::entityDefinitionUpdateManager(); $changeList = $entityUpdateManager->getChangeList();
it leads to the error. Means the problem happens
- On configuration import
- If an entity type without bundles has pending entity updates
Since database updates should always run before doing a
drush config:import
, the problem only occurs if something with the entity update (caused by another module or custom code) went wrong and the error we see here is a side-effect of it. - 🇬🇧United Kingdom jonathan1055
Thanks. This entityRevert function should not have been called during config import, that was an error and I have have removed it in the second commit. The only other places this function is callled are
(a) via a specific hook update where the parameter of 'paragraph' is passed, which means any other entity with a pending change will be ignored
(b) In scheduler's own hook_uninstall() ie when Scheduler is being uninstalled
(c) viadrush scheduler:entity-revert
If you are happy with the change, and it fixes your problem, can you mark this RTBC, then I will commit and release 2.0.1
- Status changed to RTBC
over 1 year ago 9:03pm 13 July 2023 - 🇩🇪Germany szeidler Berlin
From my side this looks good. Disclaimer: I haven't followed why it was introduced in the first place.
Even though my issue occurs only, if something else is off (in my case missing/wrong entity updates). This fix will not block any config import in such a scenario. That's good.
- last update
over 1 year ago 223 pass -
jonathan1055 →
committed 8122d8d1 on 2.x
Issue #3373860 by szeidler: entityRevert() breaks config:import for...
-
jonathan1055 →
committed 8122d8d1 on 2.x
- Status changed to Fixed
over 1 year ago 12:07pm 14 July 2023 - 🇬🇧United Kingdom jonathan1055
Disclaimer: I haven't followed why it was introduced in the first place.
I rasied the question in #3336108-12: Don't run hook_modules_installed during config install → and thought it was wrong to add it during the altered import steps, as it was not part of the original import process. I should have stuck to my hunch and removed it before committing.
Thanks for RTBC. Merged and fixed.
Automatically closed - issue fixed for 2 weeks with no activity.