LogoLogo
9.0.x
9.0.x
  • Overview
    • About Varbase
    • Roadmap
    • Release Cycle and Supported Versions
    • How to Get Support
  • Developers
    • Getting Started
    • Installing Varbase
      • Requirements
      • Installing Varbase with DDEV
      • Installing Varbase with Lando
    • Understanding Varbase
      • Basic Concepts
      • Core Components
        • Varbase Core
          • Varbase Admin
          • Varbase Page
          • Varbase Security
          • Varbase Webform
          • Varbase Default Content
          • Varbase Tour
        • Varbase Media
        • Varbase Editor
        • Varbase Email
        • Varbase SEO
        • Varbase Workflow
        • Varbase Layout Builder
          • Varbase Landing page (Layout Builder)
          • Varbase Heading Block
          • Varbase Rich Text Block
          • Varbase HTML Code Block
          • Varbase Media (Image/Video) Block
          • Varbase Gallery Block
        • Varbase Total Control Dashboard
        • Vartheme Claro
        • Vartheme BS4
      • Optional Components
        • Varbase API
        • Varbase Internationalization
        • Varbase Media Hero Slider
        • Varbase Carousels
        • Varbase Blog
        • Varbase Search
        • Varbase Social Single Sign-On
        • Varbase Media Twitter
        • Varbase Media Instagram
        • Varbase Content Planner
        • Varbase Bootstrap Paragraphs
          • Varbase Bootstrap Paragraphs Text and Image
        • Varbase Landing Page (Paragraphs)
      • Additional Components
        • Varbase Media Header
        • Varbase FAQs
        • Varbase Reports
        • Varbase Commerce
        • Varbase YouTube Import
      • Development Components
        • Varbase Development
        • Varbase Style Guide
        • Reroute Email
        • Varbase Updates Helper
    • Configuring a Varbase Site
      • Navigation
        • Defining Active Menu Trail Using Menu Position
      • Using View Modes Inventory
      • Content Moderation and Workflows
      • URL Aliases in Varbase/Drupal
        • Configuring URL Aliases
        • Managing URL Aliases
      • Managing URL Patterns for Multilingual Websites
      • Managing Date and Time Formats to Display Across the Site
      • Using Varbase Layout Builder
        • Creating a Landing Page With Varbase Layout Builder
        • Activating Varbase Layout Builder for Content Types
      • Configuring Pathologic When Going Live
      • Configuring SEO Features
        • Disallow Oembed Media Links
      • Configuring Security Features
        • Spam Protection
        • Password Policies
        • Other Security Kits
        • Flood Contorl
        • Enable HTTP Password Authentication
      • Configuring JSON:API Features
      • Configure Varbase Media Hero Slider
      • Configuring Varbase Media Header
      • Configuring Varbase Mailer Settings
        • Configure Symfony Mailer
        • Configure Swift Mailer
        • Switch From Swift Mailer to Symfony Mailer
      • Entity Definition Update Manager Class
      • Module Installer Factory Class
    • Theme Development with Varbase
      • Understanding The Vartheme Base Theme
      • Creating Your Own Theme
      • Local Tasks and Moderation Sidebar
      • Add Preloaded Fonts in Vartheme
      • Switch From Node SASS to Dart SASS for Old Sub-Themes
    • Launching a Varbase Site to Production
    • Updating a Varbase Site
      • Understanding Varbase Updater Package
      • Handling Patches When Updating
      • Handling Configuration Updates
      • Updating Varbase to work with Composer 2.0
      • Updating Drush to the Latest Stable Version
      • Version Update Guides
        • Updating Varbase ~9.0 to Drupal 10
        • Switch from CKEditor 4 to CKEditor 5 in Varbase ~9.1.0
        • Updating from Varbase 8.x to 9.x
    • Varbase Patches
    • Frequently Asked Questions (FAQs)
    • Extending Varbase
      • Overriding Varbase
      • Creating Your Own Feature
      • Creating A Sub Profile From Varbase
        • Varbase Sub Profile Generator
        • Varbase Sub Profile Basic Template
        • Varbase Sub Profile Basic Project Template
      • Install Needed YARN and Gulp Tools
      • Compiling Provided Component Styles
      • Check Standards/Practice Coding And Linting
  • Content Designers
    • Terminology
    • Accessing the Administration Area
      • Website Environments
    • User Management
      • Allow Email/Username Login & Registration
      • Default Roles and Site Personas
        • Edit Roles' Permissions
        • Managing Roles
      • Add User
      • Edit User
      • Masquerading as another user
    • Dashboard
      • Reports
    • Content Structure
      • EntityQueues
      • Menu Management
        • Add Menu Items
        • Update Menu Items
        • Adding a Page to the Menu
      • Taxonomies
        • Manage Vocabulary
        • Edit Vocabulary
        • List Terms
        • Add Terms
        • Reorder and Edit Terms
      • Webforms
        • Setting up Emails Handler Conditions
        • Setting up Confirmations Message Settings Types
    • Content Management
      • Create Content
        • Add a Basic page
        • Add a Landing page
        • Add Blog
        • Add Media
          • Image
          • Remote video
          • Video
      • Modify Content
      • Delete Content
      • Preview Content
      • Bulk Edit Content
      • Content Moderation
      • Publish Content
      • URL Alias
    • About Layout Builder
      • Section
      • Custom Blocks
        • Heading Block
        • Basic Block
        • Media Block(Image/Video)
        • Rich-Text Editor “WYSIWYG”
      • Managing Blocks
    • Search Engine Optimization
      • XML Sitemap
      • Meta Tags in Varbase
      • URL Redirects
      • Domain Redirects
      • Prevent a Single Content From Being Indexed
    • Site Configuration
      • System
        • Clearing Varbase Cache
        • Google analytics
        • Mail templates
      • User interface
      • Development
      • Varbase settings
      • Web services
    • Common Error Handling Tips
  • Contributing
    • Contributing to Documentation
Powered by GitBook
On this page
  • 1. Read First Before Updating
  • 2. Uninstall Removed Modules and Themes
  • 3. Check for Drupal 10 Compatibility
  • 4. Update old Varbase ~9.0.0 to ~9.1.0 in composer.json File
  • Fix Non-existent Permissions Issues
  • Drush Command to Fix Non-existent Permissions in Varbase
  • Before or After Uninstalling a Module
  • Fix Mismatched Entity or Field Definitions Issues
  • Drush Command to Fix Mismatched Entities in Varbase
  • Important Issues
  1. Developers
  2. Updating a Varbase Site
  3. Version Update Guides

Updating Varbase ~9.0 to Drupal 10

Paved the way for a smoother upgrade process to Drupal 10

PreviousVersion Update GuidesNextSwitch from CKEditor 4 to CKEditor 5 in Varbase ~9.1.0

Last updated 1 year ago

1. Read First Before Updating

Updating Varbase should always be done in a local or development environment. Once the update process is properly done and tested you can push your code and build to your production site. DO NOT update Varbase directly when in production.

​​

November 1, 2023 (UTC) Drupal 9 reaches end-of-life due to its dependency on Symfony 4. Reference: Symfony 4.4 release checker.

​

2. Uninstall Removed Modules and Themes

This module is no longer needed

./bin/drush pm:uninstall better_normalizers

  • Issue : Removed the Better Normalizers module from Varbase Core

Obsolete Use of this project is deprecated.

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.

Update the module first from ~2.0 to ~3.0 to run the migrate update process to switch allowed formatted fields to the Drupal ~10 processor.

composer update drupal/allowed_formats

./bin/drush updb

./bin/drush pm:uninstall allowed_formats

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.

Better to upgrade the Rabbit Hole module from ~1.0 to ~2.0 before the upgrade.

composer update drupal/rabbit_hole

./bin/drush updb

Seven was the default administrative theme for Drupal 7, 8, and 9. In Drupal 10, it was replaced by Claro.

Some Drupal 10 sites may still require or prefer Seven, so it's available here as a contrib theme.

Run the following to uninstall it only if it was not disabled before the upgrade

./bin/drush theme:uninstall seven

When upgrading an old Varbase ~8 site which was upgraded to Varbase ~9, but the quick edit module was not disabled yet, ( It was only deprecated, but removed from Drupal ~10 ).

Make sure to uninstall the module before upgrading to Drupal 10

Switch From Swift Mailer to Symfony Mailer

Swiftmailer is no longer supported and it's marked as a security issue.

Bringing a security issue with the composer No longer supported in Drupal

Not supported!

3. Check for Drupal 10 Compatibility

In numerous projects, contrib modules frequently contain outdated PHP code, including deprecated classes, functions, or libraries. Moreover, many of these projects make use of deprecated JavaScript components, such as JQuery UI libraries, or employ outdated Drupal 9 methods.

  • Push for maintainers ( by issues, Contact, ask them to commit and release )

  • Ask maintainers to give you a co-maintainer role so that you can commit and release

  • If the above did not work. Fork not compatible modules ( because they are not well maintained )

  • If we can drop the use of not well maintained module, do that by having the code in the project as a local custom module and remove it from the composer.json file

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

Important to read and follow with all steps from the beginning of this page.

  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)

Dropping support for Drupal ~9

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?

RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "~~~~~~~". in Drupal\user\Entity\Role->calculateDependencies() (line 207 of core/modules/user/src/Entity/Role.php).

Drush Command to Fix Non-existent Permissions in Varbase

  1. Run the following drush command

./bin/drush varbase:remove-non-existent-permissions

drush varbase:remove-non-existent-permissions

Remove non-existent permissions, to be used for upgrades with missing static and dynamic permissions

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?

Adding non-existent permissions to a role is not allowed.

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

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.

./bin/drush role:list --filter='access admin audit trail' --format='list'

The out put will be in a list:

editor

content_admin

seo_admin

site_admin

So that in this case the following is needed to remove:

./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'

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.

./bin/drush varbase:remove-non-existent-permissions

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. Run ./bin/drush varbase:entity-update

drush varbase:entity-update

Entity updates to clear up any mismatched entity and/or field definitions. Fix changes were detected in the entity type and field definitions.

Important Issues

  # A special flag so we can migrate permissions that do not exist yet.
  # @todo Remove in https://www.drupal.org/project/drupal/issues/2953111.
  skip_missing_permission_deprecation:
    plugin: default_value
    default_value: true

It was removed from the 10.0.x and 10.1.x branch.

Not able to connect to the Database after upgrading from Drupal 9 to 10

In case of using MySQL database

Edit the $databases['default']['default'] in settings.php or local.settings.php file.

  1. Remove the old namespace

'namespace' => 'Drupal\Core\Database\Driver\mysql',

  1. Add the following in the database settings

'namespace' => 'Drupal\mysql\Driver\Database\mysql',

'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',

Uninstall the module

Issue : Removed Allowed Formats module, as it was added in Drupal ~10.1.0 core

Since Drupal 10.1.0, limiting the text formats per field instance is a feature provided by Drupal core. Read for details.

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 .

Upgrade the module

Uninstall the Admin theme

Uninstall the module

Changed - Removed QuickEdit from Varbase Core too

Project not supported: This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended! --- Uninstall this module immediately. The swiftmailer library has been unsupported for a year, and this module is now also unsupported. Switch to Symfony Mailer in systems.

Use the module to check on extra used contrib or custom modules and themes in projects.

97% of all Modules are Drupal 10 Compatible Only ~ 3% of modules are not compatible.

Have the composer as in ​

✅ Released ( Drupal ~9 old way ) ✅ Released ( Drupal ~10 old way ) for upgrades ✅ Released ( Drupal ~10 new way - it's a migration track not an update)

Update the Varbase Core module to or later.

Use the method

List all user roles which have the permission, using the .

Update the Varbase Core module to or later.

Issue : Added Varbase Drush commands to address non-existent permissions and resolve any inconsistencies in entity and field definitions

. Permissions should be defined in a permissions.yml file or a permission callback.

The skip_missing_permission_deprecation flag that was added in Drupal 9 to the Role entity in .

Drupal 9 is end of life - PSA-2023-11-01
Drush 11 support will end in November 2023
Updating Drush to the Latest Stable Version
Better Normalizers
#3392945
Note
Allowed Formats
#3383538
#784672: Allow text field to enforce a specific text format
#3324446: Allowed formats are in Drupal 10.1 now, add an upgrade path
https://www.drupal.org/node/3318572
https://www.drupal.org/i/3323007
Rabbit Hole
Seven
Quick Edit
#3236754: Removed the Quick Edit module from Varbase install
#3227033: Removed Quick Edit from core
Varbase Admin
Swift Mailer - Moderately critical - Access bypass - SA-CONTRIB-2024-006
Switch From Swift Mailer to Symfony Mailer
Upgrade Status
https://www.youtube.com/live/08FaXNSVDrA?si=z-MhnnCfS9bUtnGj&t=7455
https://github.com/Vardot/varbase-project/blob/9.1.0/composer.json
Varbase 9.0.18
Varbase 9.1.0
Varbase 10.0.0-rc1
Sailing Smoothly with Drupal 10: A Blueprint for Long-Term Success
9.1.7
remove specified permission(s) from a role
display roles and their permissions
9.1.7
#3397695
Added Remove non-existent permissions function to be used for upgrades with missing static and dynamic permissions #10
Permissions must exist
Invalid permissions will trigger runtime exceptions in Drupal 10
#2571235: [regression] Roles should depend on objects that are building the granted permissions
Modules cannot be in a disabled state anymore, only installed and uninstalled
#1199946: Disabled modules are broken beyond repair so the "disable" functionality needs to be removed
#2953111: Only migrate role permissions that exist on the destination