Install

Works with Drupal: ^10.1 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 7.44 MB
MD5: 632d1c771c875cf458ed72b17b47715c
SHA-1: 95ad423d9427ca86bc846259766a26128111127f
SHA-256: c76b3812e69fc07fdae10cfc131c5bbe586d131dfaacd400acdd43f87567c3f1
Download zip 7.93 MB
MD5: 5cf1b26277c1f3112c824ecab68150d8
SHA-1: 452fc21cda3f7ca4f6cade1399a2f3730afd21a3
SHA-256: ab6c1031668612bbdf2eefc5167348150512f1b3f854625f39665337bc8677c2

Release notes

Fixes the fatal error on every page under Drupal 10 and Drupal 11.0–11.2 introduced in 1.0.35 (#3628961: https://www.drupal.org/project/solo/issues/3628961).

Who must update

  • Every Drupal 10 and Drupal 11.0–11.2 site running Solo 1.0.35. Those sites throw ServiceNotFoundException for Drupal\solo\Hook\SoloTheme*Hooks on every page.
  • Every sub-theme generated from 1.0.35 (a copy of the solo_subtheme starterkit). Updating Solo does not change your sub-theme's own files; make the one-line change below yourself.
  • Sites on Drupal 11.3 or later were not affected by the fatal, but should still update.

Fixes

  • The theme's #[LegacyHook] wrappers fetched their hook classes with \Drupal::service(…). Core does not load a theme's services.yml, and only registers theme hook classes as services from Drupal 11.3.0. All 38 calls now use \Drupal::classResolver(…), which returns the service where it exists and instantiates the class otherwise.
  • Removed solo.services.yml and solo_subtheme/solo_subtheme.services.yml, which core never loaded.
  • Saving theme settings on Drupal 10 and 11.0 called library.discovery->clear(), which does not exist before Drupal 11.1. It now calls clear() on 11.1+ and clearCachedDefinitions() before that.
  • Added HookClassResolutionTest, which fails if a theme hook class is fetched with \Drupal::service() or a theme services.yml reappears.
  • Tests: @group solo added beside #[Group] so Drupal 10's test runner discovers them; CI gains a Drupal 10 (previous major) job.

Sub-themes generated from 1.0.35

In your sub-theme's .theme file, in YOURTHEME_theme_suggestions_block_alter(), change:

\Drupal::service(…Hooks::class)->themeSuggestionsBlockAlter($suggestions, $variables);

to:

\Drupal::classResolver(…Hooks::class)->themeSuggestionsBlockAlter($suggestions, $variables);

You may also delete the sub-theme's .services.yml file; core never loads it.

After updating

Run drush updb, then drush cr.

Created by: flashwebcenter
Created on: 7 Oct 2026 at 01:55 UTC
Last updated: 7 Oct 2026 at 01:56 UTC
Bug fixes

Other releases