Drupal status report indicates field definition mismatch error on Description field.

Created on 14 August 2024, 4 months ago
Updated 19 September 2024, 3 months ago

Problem/Motivation

After updating from v3.2.0 to v3.2.1, the Drupal Status Report indicates the following error:

Entity/field definitions
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Brightcove Custom Field
The Description field needs to be updated.

The Description field was updated in the 3.2.1 release;
Increase custom field's description field length to 500.

Further investigation indicates the field is still defined as 255 in the db schema.

Steps to reproduce

Update to version 3.2.1 and run Drupal Status Report /admin/reports/status

Proposed resolution

I believe we would need a db update script to change the field definition from 255 to 500 length.

πŸ› Bug report
Status

Active

Version

3.2

Component

Code

Created by

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

Comments & Activities

  • Issue created by @dgilbert
  • πŸ‡­πŸ‡ΊHungary yce

    Hi,

    There is an update hook for that: brightcove_update_8114().
    Updating from 3.2.0 to 3.2.1 and running database updates should increase the description field's to 500.

  • I see that hook in the module code but it does not seem to apply with updatedb?

  • πŸ‡­πŸ‡ΊHungary yce

    Are you sure that this update ran successfully?

    On a local dev environment, I was able to upgrade to 3.2.1 from 3.2.0.
    I can see the increased size of the column in the database which after the sync run successfully.

  • In both our local and remote environments the module update ran successfully, but in both cases the db hook update does not appear to be applied per the status report error.

  • πŸ‡­πŸ‡ΊHungary yce

    Okay, can you please provide how to reproduce the issue?

    Also, can you provide the used database type/version, php and Drupal versions?

  • I'm not sure what to say about reproducing the issue other than; update the module from 3.2.0 to 3.2.1 and run the Drupal status report Status Report /admin/reports/status.

    Our local dev environments run mysql 5.7 and php 8.2.15. Our remote test environments run mysql 5.7.4 and php 8.2. Drupal is 10.3.2.

  • πŸ‡ΊπŸ‡ΈUnited States kruser

    we're seeing this issue too. the update hook runs, but the message remains.

  • We're seeing this message in Status Report too. We updated from 3.2.0 to 3.2.1, and I can also confirm that `brightcove_custom_field.description` length was 255 with 3.2.0 and is now 500 with 3.2.1. (I don't know enough about how any of this works to be able to offer suggestions for how to fix this, sorry!)

    • yce β†’ committed f41982e1 on 3.2.x
      Issue #3468171: Drupal status report indicates field definition mismatch...
  • πŸ‡­πŸ‡ΊHungary yce

    Okay, so the description field gets updated properly to have the length of 500.
    I have tested the update path using MySQL 5.7.44, PHP 8.2.25, Drupal 10.3.

    Regarding the error message I've found that the entity definition needs to be (re-)installed, seems to solve the issue.

    I've pushed the fix to the latest dev.

Production build 0.71.5 2024