Updating Varbase ~9.0 to Drupal 10

Paved the way for a smoother upgrade process to Drupal 10

1. Read First Before Updating

Updating Drush to the Latest Stable Version

2. Uninstall Removed Modules and Themes

  • Issue #3392945: Removed the Better Normalizers module from Varbase Core

Obsolete Use of this project is deprecated.

Note that there will not be a version that works on D9 and D10, that's not possible because of the return type hint change for normalizers between Symfony 4 and 6.

Since Drupal 10.1.0, limiting the text formats per field instance is a feature provided by Drupal core. Read https://www.drupal.org/node/3318572 for details.

In the 3.x branch of this module this feature has been removed as obsolete, but the module provide an update path from existing sites to move the allowed formats, as they were stored by the previous versions of the module, to Drupal >=10.1.0 way, in field settings.

The module provides also a feature that allows site builders to hide the formatted text format help and guidelines. Even this feature is still preserved in the 3.x module branch, there is an issue that aims to move it in Drupal core in the future. See https://www.drupal.org/i/3323007.

Switch From Swift Mailer to Symfony Mailer

Switch From Swift Mailer to Symfony Mailer

3. Check for Drupal 10 Compatibility

4. Update old Varbase ~9.0.0 to ~9.1.0 in composer.json File

  1. Update the project to latest version of Varbase ~9.0.0

  2. Change "vardot/varbase": "~9.0.0", to "vardot/varbase": "~9.1.0", in the root composer.json file.

  3. Add "drupal/core": "~10", in the root composer.json file.

  4. Change drupal/core-composer-scaffold to ~10 in the root composer.json file.

  5. Change drupal/core-project-message to ~10 in the root composer.json file.

  6. Change "drupal/core-dev": "~10", in the root composer.json file.

  7. Run composer update number of times ( do that 3 times min )

  8. Run ./bin/drush updb number of times ( do that 3 times min)

Fix Non-existent Permissions Issues

Have the system faced an issue with missing static or dynamic permissions while updating/upgrading? or after disabling/uninstalling a module?

Drush Command to Fix Non-existent Permissions in Varbase

  1. Update the Varbase Core module to 9.1.7 or later.

  2. Run the following drush command

Before or After Uninstalling a Module

Better to remove all permissions first for all user roles for the module before the uninstall. That can be from the Drupal UI page for permissions. Or:

Use Drush to remove specified permission(s) from a role

Have the system faced errors when uninstalling a module?

Permissions could be removed one by one and from user roles with Drush.

Use the remove specified permission(s) from a role method

Example:

If for some reason the Admin Audit Trail module wanted to be uninstalled under Drupal ~10.1.0 in a project.

In case of uninstalling without removing permissions first, the system may face issues with non-existent permissions to a role is not allowed.

Run the following drush commands to remove 'access admin audit trail' for the default user roles, or other custom user roles in the project:

./bin/drush role:perm:remove anonymous 'access admin audit trail'

./bin/drush role:perm:remove authenticated 'access admin audit trail'

./bin/drush role:perm:remove editor 'access admin audit trail'

./bin/drush role:perm:remove content_admin 'access admin audit trail'

./bin/drush role:perm:remove seo_admin 'access admin audit trail'

./bin/drush role:perm:remove site_admin 'access admin audit trail'

This method can be used before or after uninstalling a module.

Some modules use the dynamic permissions option for custom plugins, entity types, blocks, terms. To grant extra limited permissions for user roles.

Run the following command to do the bulk remove for non existent permissions, in case not wanting to do that one by one.

Fix Mismatched Entity or Field Definitions Issues

Have the system faced issues with mismatched entity or field definitions while updating/upgrading?

Drush Command to Fix Mismatched Entities in Varbase

  1. Update the Varbase Core module to 9.1.7 or later.

  2. Run ./bin/drush varbase:entity-update

Important Issues

Last updated