Email us at info@henrytech.org to discuss your Drupal Migration today!
D10 Upgrades from Drupal 9 can be tricky! There are usually unforeseen issues. Here are some commonly seen problems and solutions.
The best place to find steps on how to upgrade: https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-a-composer-based-site
Common Recurring Problems | Solution |
---|---|
Dependency problems - some modules are not d10 compatible |
The Drupal Lenient package can be first installed and then used to ignore dependency problems. But this is only a temporary fix, and the modules should then be upgraded after the d10 switch. composer require mglaman/composer-drupal-lenient composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/token"]'
|
If your base theme, (like for example, classy) is no longer in core, but your theme depends on it? | Add classy (or any theme that your custom theme is dependent on) to composer. |
capcha is d10 only | Add captcha to lenient list or use the OR logic in composer.json: "drupal/captcha": "^1.0 || ^2.0" |
ckeditor 5 is now in core | remember to configure it for all text editors after the upgrade |
better_exposed_filters and jquery modules |
better_exposed_filters depends on jquery but the module hasn't been updated to depend on the NEW d10 version of jquery. Solution is to point to the FORKED module's git repo instead of the drupal.org one. To do this, make sure you have the lenient package installed, then add the following to your composer.json: { "type": "vcs", "url": "https://git.drupalcode.org/
"drupal/better_exposed_
"drupal-lenient": { "allowed-list": ["drupal/better_exposed_ |
Custom theme folders often contain the old once references. Search your theme folder for all instances of once and replace. Search for .once( |
fix according to drupal.org. example: Don't forget to add it to your libraries file, and rebuild your front-end! # mymodule.libraries.yml |
Parameter $event of method Drupal\custom_module\ |
replace dependency where needed AFTER d10 upgrade, will break D9 |
#drupal-off-canvas is deprecated |
replace with #drupal-off-canvas-wrapper (don't forget to rebuild your front end!) |
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not |
https://stefvanlooveren.me/blog/entityquery-access-check-will-be-enforced-drupal-10 |
Ckeditor4 is deprecated but still required by some modules. | Leave in composer.json but uninstall. |
render error https://stefvanlooveren.me/errors/how-fix-call-deprecated-function-render-drupal-9 |
//example $output = render($build); $output = \Drupal::service('renderer')-> |
rowCount error - Drupal\Core\Database\ |
example of how to fix: |
PHPStan command failed: This error shows up when using the upgrade_status module | This can be ignored. Happens when there are no php files to test. https://www.drupal.org/project/upgrade_status/issues/3354706 |
Deprecated twig usage |
Use filters referenced in this link. |
file_create_url() is deprecated https://stefvanlooveren.me/errors/how-fix-call-deprecated-function-filecreateurl-drupal-9-10 |
//before file_create_url($uri)
//after \Drupal::service('file_url_generator')->generateAbsoluteString($uri) |
internal class extension error https://drupal.stackexchange.com/questions/287378/extending-core-classes-with-the-internal-tag |
either change your code to not extend internal classes, or write some behat tests to ensure your code won't break! |
If a module is only compatible with D10 https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-from-drupal-9-to-drupal-10/overview |
Use the OR logic in the composer.json: "drupal/remove_http_headers": "^1.0" to "drupal/remove_http_headers": "^1.0 || ^2.0" |
Comments