Skip to content

Main color customize option when cleared creates an error #73

Description

@mebishalnapit

When the user clicks on the Main color customize option's Clear button and after that, clicks on the Publish button then, Looks like something’s gone wrong. Wait a couple seconds, and then try again. message gets displayed on the customize settings area and the changes done also does not get saved.

Additionally, the below PHP Fatal error gets logged into the debug.log file if the WordPress debug log is enabled:

PHP Fatal error: Uncaught Less_Exception_Compiler: error evaluating function `lighten` The first argument to lighten must be a color index: 474 in /var/www/html/wp-content/themes/askbug/includes/resources/less/lib/Less/Tree/Call.php:80

To Reproduce

Steps to reproduce the behavior:

  1. Enable WordPress debug log
  2. Go to Appearance -> Customize -> AskBug Options section
  3. Search for the Main color customize option
  4. Click on the Clear button after the color select option is clicked
  5. Click on the Publish button
  6. Check the customize settings area just below the Publish button for error message
  7. Check on the PHP error log generated on the debug.log file

Expected behavior

Removing or clearing the Main color customize option and saving should not generate any kind of PHP fatal error message to be logged into debug.log file even though WordPress debug log is enabled and the customize option should be saved without any problem or any PHP error generated.

Screenshots

main-color-clear-generates-error-message

Desktop

  • OS: Linux
  • Browser: Chrome, Firefox
  • Version: 3.2.0

Additional context

Since the PHP fatal error is generated by the library file it would be better if we could add/set a default color to the Main color customize option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions