Problem/Motivation

When changing the theme for ConfigImportUITest, there is an error in Olivero:

Exception : Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated
_olivero_hex_to_hsl()() (Line: 638)

Because the method _olivero_hex_to_hsl is called with a NULL value instead of an string representing an hex color.

Steps to reproduce

Proposed resolution

Fix the _olivero_hex_to_hsl method so that the input is checked before trying to access it.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

nod_ created an issue. See original summary.

nod_’s picture

Status: Active » Needs review
StatusFileSize
new3.63 KB
nod_’s picture

StatusFileSize
new4.13 KB

quick & dirty fix

catch’s picture

Does the test need to install Olivero's default config?

nod_’s picture

I guess? we have the same issue in DistributionProfileExistingSettingsTest::testInstalled, even with the config import, the method is still a bit optimistic I think

nod_’s picture

To be clearer, I do not know how to tell the test to install the default Olivero config, help welcome :)

nod_’s picture

StatusFileSize
new4.61 KB

still not the right solution, but less bad.

lauriii’s picture

Priority: Normal » Critical

I think this might be exposing a bug. If a theme is being installed so that it gets enabled on \Drupal\config\Form\ConfigSync during the config synchronization, the page gets rendered using the theme before the config has been imported. This stops the config synchronization and leaves the site in a broken state.

alexpott’s picture

Priority: Critical » Normal
StatusFileSize
new1.98 KB
new4.09 KB

I think this is just because the test is hacking config in the sync storage - so we need to hack correctly :)

nod_’s picture

Status: Needs review » Reviewed & tested by the community

was hoping for something like this :) since the patch I sent was unrelated, i'm RTBCing this

  • catch committed c4fad46 on 10.0.x
    Issue #3295735 by nod_, alexpott, lauriii: Fix ConfigImportUITest with...
  • catch committed b52b3f4 on 10.1.x
    Issue #3295735 by nod_, alexpott, lauriii: Fix ConfigImportUITest with...
  • catch committed de30ad7 on 9.5.x
    Issue #3295735 by nod_, alexpott, lauriii: Fix ConfigImportUITest with...
catch’s picture

Version: 10.0.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.