Mismatched entity and/or field definitions (Paragraph)

Created on 6 January 2020, almost 5 years ago
Updated 2 May 2024, 7 months ago

Ok I am having the issue of an error showing on the reports page.

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Paragraph

    The Paragraph entity type needs to be updated.

I've tried version 8.x-1.10, the previous dev and the current dev version released today (6th jan 2020)

I have run "drush entity-updates"

The following updates are pending:

paragraph entity type :
  The Paragraph entity type needs to be updated.
Do you wish to run all pending updates? (y/n): y
Cache rebuild complete.                                                                  [ok]
Finished performing updates.         

If I run it again I get exactly the same output.

Everything does seem to be working fine but the error is making me nervous.
There are some similar issues which I'll link below. They all seem fixed or similar but unrelated

I have been through the fixes in all of them. Nothing has helped, in fact most seemed included in dev already.

πŸ› Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom bigmonmulgrew

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.

  • πŸ‡ΊπŸ‡ΈUnited States pmagunia Philadelphia πŸ‡ΊπŸ‡Έ

    Comment #26 helped me. I wrote an update hook for it. You'll want to change All Caps text to suit your site.

    /**
     * Fix mismatched entity warning on Status Report
     */
    function MYMODULE_update_9000(&$sandbox) {
      $field = FieldConfig::loadByName('paragraph', 'MYPARAGRAPHTYPE', 'MYFIELD');
      $field_storage = FieldStorageConfig::loadByName('paragraph', 'MYFIELD');
      $field->save();
      $field_storage->save();
    }
    
  • πŸ‡¦πŸ‡ΊAustralia hitesh.koli Melbourne

    I had a similar issue. The message appearing "Mismatched entity and/or field definitions (Paragraph)" in status report.

    After investigation it looks like the issue was with "viewsreference" module used in paragraph. some how update for `8102` did not went through.

    So in order to re-run the db updates I reset the version from 8103 to 8102.

    drush ev "\Drupal::service('update.update_hook_registry')->setInstalledVersion('viewsreference', 8102)". After running this I ran the drush updb again and the issue went away as the database changes were now in sync with codebase.

    I verified to see if the version is correctly set or not using drush ev "echo \Drupal::service('update.update_hook_registry')->getInstalledVersion('viewsreference')"

Production build 0.71.5 2024