Problem/Motivation

After upgrading to Drupal 10.3.1, I encountered the following error message:

"Base table or view not found: 1146 Table 'db.taxonomy_term__scheduled_transition_date' doesn't exist"

This issue arises due to changes in Drupal core allowing moderation in Workflow type: content moderation for "Taxonomy term types". For existing sites, these entity types currently lack the scheduled_transition_date and scheduled_transition_state fields required by the updated content moderation workflows. Version 4 of the lightning_workflow module removed update hooks, complicating the addition of these fields.

To resolve this, we need to add these fields to support the new entity types permitted by the content_moderation module in Workflow type content moderation. This issue may only affect sites where lightning_workflow module version 4 was already installed prior to updating to Drupal core 10.3.1.

It's important to note that no migration is necessary since this involves a new content type now supported by Workflow type content moderation. Therefore, the solution involves adding the scheduled_transition_date and scheduled_transition_state fields for the affected entity types.

Steps to reproduce

1. Install version 4 of the lightning_workflow module on an existing Drupal site running Drupal 10.2.7 or an earlier version.
2. Upgrade the site to Drupal core 10.3.1.
3. Navigate to Administration -> Reports -> Status report.
4. Check Status Details -> Errors section.
5. You will encounter the following error for Taxonomy term content entity:
The Scheduled transition date field needs installation.
The Scheduled transition state field needs installation.

Proposed resolution

Create an update hook to incorporate these fields into the newly supported entities by the content_moderation module.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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:

Comments

yovanny.gomez.oyola created an issue. See original summary.

yovanny.gomez.oyola’s picture

Added patch to fix this error. Working fine with Drupal core 10.3.1 and lightning_workflow 4

shaunlaws’s picture

Thanks yovanny.gomez.oyola! This patch got rid of the error on the status page about the missing fields and the related PHP error when updating to 10.3.0.

yovanny.gomez.oyola’s picture

Status: Active » Needs review
jessey’s picture

cobenash’s picture

Hi folks,

I have the same issue. #2 works on my side.

I upgraded from 10.2.5 to 10.3.5, and I also upgraded all the lightning projects to the latest.

"drupal/lightning_api": "~5.0.0",
 "drupal/lightning_core": "^6",
  "drupal/lightning_layout": "~3.0.0",
"drupal/lightning_media": "~5.0.0",
 "drupal/lightning_workflow": "~4.0.0",

But I didn't do a full check. The only thing I do is use the drush command and deploy all the configuration settings.

sridhar52’s picture

It's same issue while upgrading to Drupal 11

"drupal/lightning_core": "^6.0",
"drupal/lightning_layout": "3.0.1",
"drupal/lightning_media": "^5.0",
"drupal/lightning_workflow": "^4.0",

Base table or view not found: 1146 Table 'drupal.block_content__scheduled_transition_date' doesn't exist

carlos romero made their first commit to this issue’s fork.