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
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3295735-9.patch | 4.09 KB | alexpott |
| #9 | 7-9-interdiff.txt | 1.98 KB | alexpott |
| #7 | core-3295735-7.patch | 4.61 KB | nod_ |
| #3 | core-3295735-3.patch | 4.13 KB | nod_ |
| #2 | core-3295735-2.patch | 3.63 KB | nod_ |
Comments
Comment #2
nod_Comment #3
nod_quick & dirty fix
Comment #4
catchDoes the test need to install Olivero's default config?
Comment #5
nod_I guess? we have the same issue in DistributionProfileExistingSettingsTest::testInstalled, even with the config import, the method is still a bit optimistic I think
Comment #6
nod_To be clearer, I do not know how to tell the test to install the default Olivero config, help welcome :)
Comment #7
nod_still not the right solution, but less bad.
Comment #8
lauriiiI think this might be exposing a bug. If a theme is being installed so that it gets enabled on
\Drupal\config\Form\ConfigSyncduring 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.Comment #9
alexpottI think this is just because the test is hacking config in the sync storage - so we need to hack correctly :)
Comment #10
nod_was hoping for something like this :) since the patch I sent was unrelated, i'm RTBCing this
Comment #12
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!