schemadotorg_update_10008 fails

Created on 7 October 2024, about 2 months ago

Problem/Motivation

I'm currently trying to upgrade from 1.0.0-alpha24 to 1.0.0-alpha26

I usually use the config_sync method to update as I have always been doing for this module.

However, schemadotorg_update_10008 throws this error:

>  [error]  str_replace(): Argument #3 ($subject) must be of type array|string, null given 

I tried upgrading from 1.0.0-alpha24 to 1.0.0-alpha25 but got the same thing.

Steps to reproduce

Install 1.0.0-alpha24, then try to upgrade to 1.0.0-alpha25 or 1.0.0-alpha26

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΉπŸ‡ΉTrinidad and Tobago xamount

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

Comments & Activities

  • Issue created by @xamount
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    My best guess is that schemadotorg_update_10001() was not triggered, and/or schemadotorg.settings.yml was not updated via this hook. You need to export the configuration anytime updates are executed.

    Please run the below update hook via Drush.

    drush php-eval "\Drupal::moduleHandler()->loadInclude('schemadotorg', 'install'); schemadotorg_update_10001()";

  • πŸ‡ΉπŸ‡ΉTrinidad and Tobago xamount

    Thanks @jrockowitz

    That worked and you were exactly right!

    These are the steps I have been following since using this module a few months now:

    1. composer require drupal/config_sync
    2. drush en config_sync -y
    3. drush cr
    4. composer update drupal/schemadotorg --with-all-dependencies
    5. drush updb -y
    6. drush cr
    7. Go to /admin/config/development/distro and import the new config
    8. drush pmu config_sync
    9. drush pmu config_update
    10. drush pmu config_snapshot
    11. drush pmu config_provider
    12. drush pmu config_filter (this will also uninstall config_filter, config_distro_filter, config_normalizer)
    13. drush pmu config_merge
    14. drush pmu config_distro
    15. composer remove drupal/config_sync
    16. ddev drush cex -y (this is a new step I introduced as a result of this issue. I wasn't doing this before which is why I got the error)
    17. drush cr

    It would save others numerous hours if you can correctly refine this and consider posting it on the module's page until a stable release.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Adding step .16 is key.

    I could use help creating an Update Guide at https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β†’ . We can link to it from the project page.

    The 'Update Guide' could simply contain your current steps, and people can help refine them.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Thanks. I added a learn more link to the project pag β†’ e.

Production build 0.71.5 2024