Cannot update - social_course update_xxx fail

Created on 15 July 2025, about 1 month ago

Problem/Motivation

When I run ddev drush updatedb I get the following:

// Do you wish to run the specified pending updates?: yes.

> [notice] Update started: social_course_advanced_update_8001
> [error] The module module does not exist.
> [error] Update failed: social_course_advanced_update_8001
> [notice] Update started: social_course_basic_update_8001
> [error] The module module does not exist.
> [error] Update failed: social_course_basic_update_8001
> [notice] Update started: social_course_update_8304
> [error] The module module does not exist.
> [error] Update failed: social_course_update_8304
[error] Update aborted by: social_course_advanced_update_8001, social_course_basic_update_8001, social_course_update_8304
[error] Finished performing updates.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

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

Comments & Activities

  • Issue created by @SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    this happens if you have update_helper installed. It does not if it is not.

    What happens during updates:

    - update_helper loads the entity (line 432 in Updater.php)
    - Compares it against expected_config
    - If it matches, proceeds with update_actions
    - If it doesn't match or entity is null, it fails safely

    The original empty {} was problematic because:
    - It allowed null entities to pass validation
    - Caused the fatal error when trying to call updateFromStorageRecord() on null
    - Essentially bypassed the safety checks

    There is a patch to make the updates more robust.

    And there is this patch for update_helper:

     "drupal/update_helper":{
                "Argument #1 ($entity) must be of type Drupal\Core\Config\Entity\ConfigEntityInterface":"https://www.drupal.org/files/issues/2023-02-20/entity-3343140-2.patch"
            },

    I saw the patch above which matches the update error that I saw.
    I created the patch and tested it and it seems to work.

    patch file: 3536078-fix-extension-list-module-getpath-comprehensive.patch

    This patch includes fixes for:
    - social_course_update_8305.yml (3 views)
    - social_course_update_8307.yml (1 view)
    - social_course_statistics_update_13001.yml (2 views)

    It was successfully tested on social_course 6.2.4 and applies cleanly.

Production build 0.71.5 2024