10.2.0 DB update failes with "add_description_to_entity_view_mode update"

Created on 16 December 2023, 7 months ago
Updated 25 January 2024, 5 months ago

Problem/Motivation

When running the database update script after updating to 10.2.0 it spits out the following error:

add_description_to_entity_view_mode update
failed: Drupal\Core\Config\ConfigDuplicateUUIDException: Attempt to save a configuration entity 'node.Full' with UUID '6ca186ec-f5c2-4e85-a1ed-60734ebf614e' when this UUID is already used for 'node.full' in Drupal\Core\Config\Entity\ConfigEntityBase->preSave() (rule 306 of /var/www/clients/client1/web5/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php).

i'm pretty sure this is because this is a migrated site from drupal 7 that is causing issues.

Because of this i cannot finish the update proces.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Fixed

Version

10.2 ✨

Component
Database update  →

Last updated less than a minute ago

No maintainer
Created by

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

Comments & Activities

  • Issue created by @demon326
  • Status changed to Fixed 7 months ago
  • If other people encounter the same issue:

    1) go to admin/structure/display-modes/view
    2) click edit and see what view_mode does NOT load to edit
    3) Export your site config
    4) BACKUP DATABASE
    5) run drush config:delete core.entity_view_mode.node.
    6) compare working view_modes and fix the faulty one and import it again.

    In my case it was "node.full" and "node.teaser" that where broken. I looked at a working one and made some adjustments.

    uuid: youruidhere
    langcode: nl
    status: true
    dependencies:
      module:
        - node
    id: node.Full
    label: Full
    description: ''
    targetEntityType: node
    cache: true
    

    I added description: '' and then reimported it and it works now.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed 6 months ago
  • 🇬🇧United Kingdom cebab54

    I have the same issue after upgrade to Drupal 10.2 from 9.5
    But having looked at the matters that demon326 sets out, none of the view_modes fail to load to edit
    So I am no further forward and I still have 19 database updates that will not complete with the eror:

    system module
    Update add_description_to_entity_view_mode
    Failed: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of /home/cqsaservices/public_html/core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    
  • 🇷🇴Romania idflorin

    @demon326 Worked for me. Thank you.
    Some clarification
    First: Install drush using composer composer require --dev drush/drush @via https://drupalize.me/tutorial/install-drush-using-composer
    In my case, it was also "node.full" and I need to run
    ./vendor/bin/drush config:delete core.entity_view_mode.node.full
    Step 6) was unnecessary in my case.

  • 🇮🇳India mobym

    In my case Issue comes from core.entity_view_mode. file where targetEntityType is null ,deleting the mentioned file from configuration and again running the database update fixed the issue.

Production build 0.69.0 2024