Custom Theme Migration from Drupal 9 to Drupal 10
February 17, 2023

The upgrade path from Drupal 9 to Drupal 10 depends on the modules and themes you have installed and on the custom ones your team have developed.

Following the official guide of this upgrade will hopefully take you through the process and resolve all the issues you might encounter.

In our case we had a custom built theme started on Drupal 9 and it did follow all the latest standards and recommendations of the time. After the migration process completed successfully we kept seeing warnings in our admin status reports about the stable theme being deprecated. We could not find a straightforward guide to handle this issue and hence after a bit of research and resolution we are writing this guide. We have taken a few ideas from this change record about the stable theme being removed from core.

Below is a step by step guide on how to fully migrate your custom coded theme from Drupal 9 to Drupal 10 and removing all warnings from the status report.

  1. Remove the dependency on the stable theme. In your theme.info.yml file do set the base theme attribute to false instead of stable.
  2. Copy any needed template files from the stable theme to your custom theme. In our case, our theme was fully custom and hence this step was not necessary. This might be a complex and time consuming step depending on how you wrote your theme.
  3. Refresh caches and check your new theme and it should be working properly in Drupal 10. However, a warning about the stable theme being deprecated persists in the status report. This is because the stable theme is still enabled but is hidden from the appearance section. It was enabled previously since your theme was based on it but it does not get auto disabled.
  4. To disable the stable theme, open the /web/core/themes/stable/stable.info.yml file and set the hidden attribute to false. Now uninstall the stable theme from the appearance section of Drupal. Set the hidden attribute back to true for consistency.
  5. Refresh caches and the warning should be gone from your status reports.

Congratulations on your proper upgrade to Drupal 10 and enjoy the new features!


Development Drupal Open Source

Share this post


Written by
Mario Awad

Founder of SOFTKUBE, lead developer, and getting things done addict. Passionate about open source, user interface design, business development, and the tech world.

More about Mario Awad


About
SOFTKUBE

A small team of experts developing simple, usable, and high-quality web solutions. We blog about business, entrepreneurship, web development, and technology.

More about us


Recent Posts

Gaining Access to a Legacy Google Apps Account When Phone Verification Fails

Custom Theme Migration from Drupal 9 to Drupal 10

How to Change the Most Recent Git Commit Message

How to Make Google Chrome Forget a Permanent HTTP 301 Redirect

View all posts


All Posts Categories

Business Cheat Sheets CLI Design Development Downloads Drupal Email Google Apps HID Keyboards Multilingualism Open Source Philosophy PHP Pointing Devices Productivity Quotes Science Security SEO Technology Thoughts Windows Zend Framework