Problem/Motivation
On the status report page I see "Mismatched entity and/or field definitions" with:
Media
The Publish state field needs to be installed.
The Unpublish state field needs to be installed.
Taxonomy term
The Publish state field needs to be installed.
The Unpublish state field needs to be installed.
composer.json:
Scheduler 2.0.0-rc6
1. "drupal/scheduler": "^2.0@RC"
2. "drupal/scheduler_content_moderation_integration": "2.x-dev@dev"
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | status-page-before-patch.png | 110.28 KB | dtfabio |
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3317965-add-fields-to-entity-type
changes, plain diff MR !77
Comments
Comment #2
evgen commentedComment #3
evgen commentedThis is the patch for fixing described issue for node, media and taxonomy_term entity types.
Comment #4
smustgrave commentedOn a fresh Drupal 9.5 install
Installed SCMI
Did not see that error in the status report.
Can you provide the steps you did to trigger this.
Once those are determined they should probably be added to a test case.
Comment #5
monymirza@smustgrave This happens when upgrade from 1.x
Usually after drush updb, and revert config.
Comment #6
miksha commentedUpdated patch.
Comment #7
loopy1492 commentedWe were getting the following:
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:
Then commit the new configuration.
Comment #8
heikkiy commentedWe 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.
I ran the above drush commands and it seems like both scheduler_content_moderation_integration_update_9001(); and scheduler_content_moderation_integration_update_9002(); did changes.
EDIT: Same result for the second site.
Comment #9
robpowellI'll flag that we recently ran into this problem as well. I ended up running the update hooks programmatically and that resolved the problem.
Comment #10
robpowellComment #11
iajon commentedWe 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.
Comment #14
jonathan1055 commentedThanks @iajon for latest patch. I have converted it to a MR. Please can anyone here test it. Thanks
Comment #15
jonathan1055 commentedI 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?
Comment #16
dtfabio commentedHi 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.
Comment #17
andyf commentedI think what some folk might be experiencing is connected with taxonomy terms becoming moderatable in 10.3. If you install this module prior to 10.3, and then update to 10.3, I think the module suddenly changes the base fields it's adding to taxonomy terms, without going through the normal process of installing the new fields. (So I'd assume the issue wasn't that developers had been forgetting to update properly, but rather they had already run the DB updates to add fields before they updated Drupal to 10.3.) Just a theory!
Comment #18
smustgrave commentedCan anyone confirm this is a bug in 3.0.x?
Comment #20
smustgrave commentedSince there's been no follow up going to close out. If still a bug in 3.0.x please re-open. Shutting down 2.0.x probably soon.