Save Color Scheme throws error (WSOD)

Created on 27 November 2022, over 1 year ago
Updated 20 January 2024, 5 months ago

Problem/Motivation

The website encountered an unexpected error coming which is -
Save Color Scheme - "The website encountered an unexpected error. Please try again later." (Error: Call to undefined function drupal_get_path() in at_color_scheme_form_submit() (line 98...)

๐Ÿ› Bug report
Status

Fixed

Version

5.1

Component

Theme Settings

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium bart lambert

    Why won't this be fixed?
    drupal_get_path() is removed and can't be called upon in D10.It is still present in the color_submit.php file which is part of AdaptiveTheme.
    So as far as I understand it should at least be corrected here before we can carry on.

  • Status changed to Active 11 months ago
  • Status changed to Needs review 11 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia roshni27

    please review the patch.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia keshav.k

    keshavv โ†’ made their first commit to this issueโ€™s fork.

  • @keshavv opened merge request.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia keshav.k

    Thank you for the patch. But the patch will not work, Because it removed the trailing slash as well, Also there is one more occurrence.
    So I have created the MR to fix issues from all places.
    Please review,
    Thank you.

  • Updated issue summary with the actual error.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium bart lambert

    After correcting the color_submit.php file according MR4! following error is thrown when I want to change te colors:

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

  • ๐Ÿ‡ญ๐Ÿ‡บHungary janoka

    The code in the patch is good, as the previous error message has disappeared from the log.
    Once applied, only the CssOptimizer error remains.
    I think the patch covers the original bug.

  • Neither the patch nor the merge request work. The patch from roshni27 fails to copy the theme logo because the trailing slash is missing so that it fails to find the logo.

    The merge request leads to the following error:

    Uncaught PHP Exception 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 132 and exactly 1 expected" at web/core/lib/Drupal/Core/Asset/CssOptimizer.php line 34" while reading response header from upstream

    • 98245ec8 committed on 8.x-5.x
      Issue #3323932 by roshni27: Save Color Scheme throws error (WSOD)
      
  • This has been fixed and will make its way into a new release later today

  • Status changed to Fixed 6 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024