Changing color scheme throws error "too few arguments to function"

Created on 25 April 2025, 3 days ago

Problem/Motivation

Adaptivetheme creates an error when changing the color scheme using the color module:

ArgumentCountError: Too few arguments to function Drupal\Core\Asset\CssOptimizer::__construct(), 0 passed in web/themes/contrib/adaptivetheme/at_core/forms/color/color_submit.php on line 144 and exactly 1 expected in Drupal\Core\Asset\CssOptimizer->__construct() (line 34 of web/core/lib/Drupal/Core/Asset/CssOptimizer.php).

Steps to reproduce

Create a vanilla Drupal 10 installation with

composer create-project drupal/recommended-project:10.4.6 "install-dir"
composer require 'drupal/adaptivetheme:^7.1'
composer require 'drupal/at_tool:^3.1'
composer require 'drupal/color:^1.0'
(or composer require 'drupal/color:1.x-dev@dev')
composer require drupal/stable

Install the site using the browser.
In the website:

  1. Activate Adaptivetheme, AT Tool, Color.
  2. Create a new Subtheme.
  3. Try to change the color scheme and run into the error mentioned above.

There is an issue 3323932 for AdaptiveTheme 8.x-5.x that seems to be related, but it is marked as solved long ago.

Proposed resolution

Maybe there is another set of versions that will work - I don't know. Please also clarify which are the new versions to go with.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

7.1

Component

Theme Settings

Created by

🇩🇪Germany Kniekel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024