fix(theming): Add migration to restore primary color after separating primary and background#47586
Conversation
|
/backport to stable30 |
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
If it is fixed now, then I love to. It had a really bad bug that you cannot mix One recent place were we needed to fix this: #46991 |
come-nc
left a comment
There was a problem hiding this comment.
The config key to check if repair step ran already is too ugly, please use a migration instead which by design run only once.
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
|
@come-nc I refactored this again, but we need to put parts of the migration into a background job. As we need to iterate a list of users which could take long if many users had custom backgrounds. I reused the logic from the So it is now working correctly for me: Screen recordingSetupBildschirmaufnahme_20240902_165334.webmAfter Upgrade to Nextcloud 30 / 31Please note the wrong colors in the beginning, I triggered the migration then and reload the page:
This is all fixed after the migration + background job ran: Bildschirmaufnahme_20240902_170942.webm |
|
Psalm is quite angry |
Signed-off-by: Ferdinand Thiessen <[email protected]>
…y and background Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
…-query Signed-off-by: Ferdinand Thiessen <[email protected]>
Summary
Not sure about the user color part, but at least it works 😅
Meaning not sure if that query would not take long on large instances.
Checklist