I was getting an error about the deprecated drupal_get_path command in color_submit.php, so I replaced it on line 98 with:

\Drupal::service('extension.list.theme')->getPath('my_theme_name')

That got me further to the current error.

Using Drupal 10, and this occurs when I try to change the color theme in AdaptiveTheme.

Thanks

Comments

dribgnikcom created an issue. See original summary.

dribgnikcom’s picture

Issue summary: View changes
sagar25’s picture

Assigned: Unassigned » sagar25
markusk’s picture

Title: ArgumentCountError: Too few arguments to function Drupal\Core\Asset\CssOptimizer::__construct(), 0 passed in /home/ubuntu/web/themes/contrib/adaptivetheme/at_core/forms/color/color_submit.php on line 134 and exactly 1 expected in Drupal\Core\Asset\CssO » Deprecated drupal_get_path() in color_submit.php

Clarified issue subject for readability.

Original subject was
ArgumentCountError: Too few arguments to function Drupal\Core\Asset\CssOptimizer::__construct(), 0 passed in /home/ubuntu/web/themes/contrib/adaptivetheme/at_core/forms/color/color_submit.php on line 134 and exactly 1 expected in Drupal\Core\Asset\CssO

dribgnikcom’s picture

Title: Deprecated drupal_get_path() in color_submit.php » Too few arguments to function Drupal\Core\Asset\CssOptimizer

No -- you changed the title to the incorrect error... That is a seperate error that is fixed by replacing the deprecated command. The actual error is deeper somewhere in the code.