publish_state and unpublish_state are missing and the status report showed "Mismatched entity and/or field definitions".

Created on 28 October 2022, about 2 years ago
Updated 30 July 2024, 4 months ago

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"

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇺🇦Ukraine evgen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇸Serbia miksha

    Updated patch.

  • 🇺🇸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 term

    The 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 robpowell Boston
Production build 0.71.5 2024