1

After much package dependency finagling via composer, updating PHP, updating MariaDb, etc.. (not as bad as D7 => D8 but still harder than I'd hoped) I managed to update from 8.9 => 9.0.7. I was able to run update.php, clear cache, etc. site seemed to be working ok, no errors. I enabled the core Media module as apparently blazy now depends on it. Now I'm getting:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘########.media' doesn't exist: SELECT "base_table"."vid" AS "vid", "base_table"."mid" AS "mid" FROM {media} "base_table" GROUP BY base_table.vid, base_table.mid LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\EntityStorageBase->hasData() (line 583 of /var/www/sites/#####.test/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php).```

If I try to run update php I see:

MISSING UPDATES FOR: MEDIA The installed version of the Media module is too old to update. Update to a version prior to 9.0.0 first (missing updates: media_post_update_collection_route, media_post_update_storage_handler, media_post_update_enable_standalone_url, media_post_update_add_status_extra_filter).

MISSING UPDATES FOR: MEDIA LIBRARY The installed version of the Media Library module is too old to update. Update to a version prior to 9.0.0 first (missing updates: media_library_post_update_display_modes, media_library_post_update_table_display, media_library_post_update_add_media_library_image_style, media_library_post_update_add_status_extra_filter, media_library_post_update_add_buttons_to_page_view, media_library_post_update_update_8001_checkbox_classes, media_library_post_update_default_administrative_list_to_table_display, media_library_post_update_add_langcode_filters).

I'd rather not take core back to an earlier version to resolve this as I'd have to also downgrade some modules, namely Solr which was not super easy to configure.

Can anyone suggest how I might go about resolving this? Is there a way to update a core module without updating core? I thought of just copying and pasting but obviously that wouldn't resolve my missing table issue.

Any pointers in the right direction would be immensely appreciated.

2
  • 2
    D9 modules will work on D8. I'm a fraid you'll have to go back to a D8 core; otherwise, you'll have to manually do the changes to your DB that those updates execute.
    – No Sssweat
    Oct 15, 2020 at 23:07
  • When I reverted my app broke. Error: __clone method called on non-object in /var/www/sites/######.test/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php on line 426 Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: Route "system.site_maintenance_mode" does not exist. in /var/www/sites/#####.test/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php on line 432 Most likely something I did wrong. Ended up just rebuilding my VM & starting over. If you post your answer as a question I'll select it. Oct 20, 2020 at 19:01

1 Answer 1

2

D9 modules will work on D8. You'll have to go back to a D8 core and then go to /update.php or if you have Drush, run drush updb; otherwise, you'll have to manually do the changes to your DB that those updates execute.

2
  • I had an issue importing configuration on D9, so I revert to Drupal8, run updatedb, back to drupal 9, and the issues were fixed. Oct 9, 2021 at 4:16
  • How does one "go back to a D8 core"?
    – zkent
    May 4 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.