Since upgrade to Drupal 10, cannot fully update DB

Created on 4 January 2024, 6 months ago
Updated 31 March 2024, 3 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Since apparently a successful initial upgrade from Drupal Core 9.5 to Core 10.2.0, I cannot FULLY run the update.php - I am left with 19 updates required and the following FAILURE message:

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).

I can find no reference to others having this particular Failure and despite 18 other updates apparently clearing, the Failure does not allow the DB to be updated, meaning that a further run of update.db reports the same 19 DB updates required.

In the site's error log, I do get a repeated error as follows - this is new with Drupal 10:

File not found: /home/cqsaservices/public_html/modules/contrib/mobile_detect/lib/mobiledetect-mobiledetectlib/v2.8.38/Mobile_Detect.php.

Can somebody please help, or at least point me in the right direction?

Thank you

๐Ÿ’ฌ Support request
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Entityย  โ†’

Last updated 1 minute ago

  • Maintained by
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @catch
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland @Berdir
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany @hchonov
Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom cebab54

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.

  • Issue created by @cebab54
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zeeshan_khan

    For Mobile Detect issue please check if the module is upgraded to latest version 3.0.6

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    Support requests cannot be critical.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom cebab54

    Yes Mobile Detect is the latest version installed is 3.0.6

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom cebab54

    Re #2

    I do not have CK4 installed - it was deprecated in Drupal 9 and I installed CK5 instead - CK4 is not available in Drupal 10
    How do I check what Plugins are allegedly installed on the site?

    The link you have provided doesnt seem to relate to the issue I have as far as I can see

  • Hello,

    Have you found a solution to this? I'm having the same problem popping up on a site and haven't been able to figure out where it stems from.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom cebab54

    @dgray12

    Unfortunately not and it is consuming my time, I believe I will need to re-install Drupal 9.5 and perhaps rebuild the site from scratch again. Since building the site in Drupal 8, I have only added Modules using Composer and Drush. If the error 'Failure' message held more clued or somebody could suggest where I coulf find the NULL entry in the database I might be able to trace the errant module down, but I have no idea what or how to find out what is causing this error. Its a huge issue without an answer.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    I have no idea what or how to find out what is causing this error

    I donโ€™t mean this to sound glib, but you could use a PHP debugger to uncover the cause. You could get a stack trace.

  • Hello,

    I was able to solve this issue on the website where this was happening, and it wasn't really tied to a module in my case. I used the module 'Devel' and 'Devel Entity Updates' to better debug.

    I enabled 'Config Editor' under the Devel 'Configure' link. Under 'Config Editor', I looked at every configuration that starts with 'core.entity_view_mode', checking to see if they were missing any values. I noticed a single one where the targetEntityType was set to 'null'. I deleted this configuration, ran the DB script and it seemed to run with no issues.

    I hope this helps!

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sumithra ramalingam

    @dgray12 worked for me, Thank you.

    I have used drush command to edit the config and verified the configuration that starts with 'core.entity_view_mode'.
    Deleted the configuration which was having targetEntityType null and the ran the update.php.

    All good now !

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom cebab54

    Running: drush updatedb:status --strict=0

    I get:

    -------- ------------------ ------------- ------------------------------------
    Module Update ID Type Description
    -------- ------------------ ------------- ------------------------------------
    system add_description_ post-update Update description for view modes.
    to_entity_view_mode

    system enable_password_ post-update Enable the password compatibility
    compatibility module.

    system linkset_settings post-update Add new menu linkset endpoint
    setting.

    system mailer_dsn_settings post-update Add new default mail transport
    dsn.

    system remove_asset_entries post-update Remove redundant asset state and
    config.

    system remove_asset_query post-update Remove redundant asset query
    _string string state.

    system set_blank_log_url post-update Updates
    _to_null system.them
    e.global:logo.url
    config if it's still at
    the default.

    system timestamp_formatter post-update Update timestamp formatter
    settings for entity
    view displays.

    text allowed_formats post-update Add allowed_formats setting to existing text fields.

    update set_blank_fetch_url post-update Updates update.settings:fetch.url
    _to_null config
    if it's still at the
    default.
    views add_missing_labels post-update Add labels to views which don't have one

    views boolean_custom_titles post-update Update Views config schema to make
    boolean custom titles translatable.

    views fix_revision_id_ part post-update Fix '-revision_id' replacement token syntax.

    views oembed_eager_load post-update Add eager load option to all
    oembed type field configurations.

    views remove_default_a post-update Remove default_argument_skip_url setting.
    rgument_skip_url

    views remove_skip_cache post-update Remove the skip_cache settings.
    _setting

    views responsive_image post-update Add lazy load options to all responsive
    _lazy_load image type field configurations.

    views taxonomy_filter_ post-update Removes User context from views with taxonomy filters.
    user_context

    views timestamp_formatter post-update Update timestamp formatter settings for views.

    -------- ------------------ ------------- ------------------------------------

    Can anybody please help me with this and how to resolve these issues?

    Thanks

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance informatique clouturier christophe

    hy,

    the #10 of @dgray12 work fine for me.

    thank

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Gogowitsch

    I used the inspiration from #12 to fix my site. In my case, dr updb (database migration using Drush) complained about a missing entity "crop". Here are my steps - in case you find them easier than #12:

    • open Bash
    • run dr cex -y
    • cd to the export directory
    • run grep <em>crop</em> core.entity_view_mode* (here "crop" is the missing entity the migration stumbled over.
    • delete the config using dr config:delete <em>core.entity_view_mode.crop.token</em> (in my case, grep found core.entity_view_mode.crop.token.yml)
    • run the migration again, e.g. using dr updb
Production build 0.69.0 2024