Call to a member function getConfigDependencyName() on null in Drupal\Core\Entity\EntityDisplayBase->calculateDependencies()

Created on 13 June 2023, 12 months ago
Updated 15 May 2024, 17 days ago

Problem/Motivation

  • upgraded from PHP 7.4 to PHP 8.1
  • upgraded from D9.3.x to D9.5.9
  • upgraded from Acquia CMS 1.4.0 to Acquia CMS 1.5.5
  • scheduler_content_moderation_integration 2.0.0-beta1
  • System has these entities: node, media
  • Error by: docroot/modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install->scheduler_content_moderation_integration_update_9002()

Steps to reproduce

  1. Run /update.php URI
  2. Click Continue button
  3. Apply pending updates
  4. Error begin at: docroot/modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.module->_scheduler_content_moderation_integration_reset_form_display()
  5. The script gets "media_library" form mode from entity (entity: media) instead of (entity: node, bundle: media).
  6. Then it tries to remove "publish_state" component from (entity: node, bundle: media) which is not existing.

Proposed resolution

  1. use $entityTypeId instead of $bundle_id at docroot/modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.module:219
  2. To postpone the update script until the issue is fixed, create a module, use hook_batch_alter to skip it.
  3. Related core patch (NOT RECOMMENDED) https://www.drupal.org/project/drupal/issues/3062441 πŸ› Can't run update.php after upgrade to 8.7.3: "Call to a member function getConfigDependencyName() on null in Drupal\Core\Entity\EntityDisplayBase->calculateDependencies()" Needs work

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡»πŸ‡³Vietnam miserable_full-stack_developer

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.

Production build 0.69.0 2024