- ๐บ๐ธUnited States loopy1492
We were getting the following:
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Taxonomy term
The Publish state field needs to be installed.
The Unpublish state field needs to be installed.We attempted to remediate by simply uninstalling and reinstalling the module and exporting the config, but we received the error from https://www.drupal.org/project/scheduler_content_moderation_integration/... โ
For some reason, it became very clear that many of our sites were missing one or more of updates 9001, 9002, and 9003. I am not sure if this was due to a developer's error in not exporting the configuration and commiting the configuration to the codebase, or if it's an issue with Scheduler dropping off updates later in its version life. I'd suspect it's the former because the current scheduler still has these updates in the code.
We had to do the following:
drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install';" drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install'; scheduler_content_moderation_integration_update_9001();" drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install'; scheduler_content_moderation_integration_update_9002();" drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install'; scheduler_content_moderation_integration_update_9003();" drush cex -y
Then commit the new configuration.
- ๐ซ๐ฎFinland heikkiy Oulu
We encountered this same problem in two different sites after updating the module.
I would be willing to accept that we did a mistake once and forgot to export configurations once after the database updates but these sites were updated by two different developers and both sites are reporting mismatch for taxonomy terms.
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Taxonomy termThe Publish state field needs to be installed.
The Unpublish state field needs to be installed. - ๐บ๐ธUnited States robpowell Boston
I'll flag that we recently ran into this problem as well. I ended up running the update hooks programmatically and that resolved the problem.
- ๐บ๐ธUnited States iajon
We encountered this issue when upgrading from Drupal 10.2.x to 10.3.x. Moderation for taxonomy terms โ was added in 10.3โScheduler Content Moderation Integration's 3.0.x branch addresses this with an update hook, but the 2.x branch doesn't have a similar update hook to handle it.
This patch adds the update hook from the 3.0.x branch which resolved the issue on our end. That said, we ultimately opted to update the module to 3.0.x instead.
- Status changed to Needs work
4 months ago 2:17pm 24 January 2025 - First commit to issue fork.
- Merge request !77#3317965 hook_update to add state fields to newly supported entity types โ (Open) created by jonathan1055
- ๐ฌ๐งUnited Kingdom jonathan1055
Thanks @iajon for latest patch. I have converted it to a MR. Please can anyone here test it. Thanks
- ๐ฌ๐งUnited Kingdom jonathan1055
I blindly converted the patch to a MR but the new update function is exactly the same as the same as the existing update_9001. So ignore the request for testing. In the wider picture is this still a problem?
- ๐ง๐ชBelgium dtfabio Ninove
Hi jonathan1055,
I can confirm what iajon said in comment #11, I had the same problem on version 2.0.0 and the MR from #13 fixed it.
I then tested without the patch and version 2.0.0 of the module. This gave the same error after the updates on the status page.
If I then switched to the 3.0.4 version of the module, an update hook gets runs and the problem was fixed.
So I think the update is still needed to avoid problems with the 2.x version.