User tests: Successful: Unsuccessful:
On updated versions of Joomla there is no value set for the colorscheme and the only way to enable the colorscheme switch is to op4en the atum template style and then save it.
This PR is (hopefully) sql that will run on the next patch release that will add a default value for the colorScheme so that the switch is always available. Note that if a user has already set a value then nothing is changed.
I dont have a current postgres server so am relying on others to test that carefuly.
Pull Request for Issue #43307 (part).
Update an existing joomla site with the prebuilt package available here https://artifacts.joomla.org/drone/joomla/joomla-cms/5.1-dev/43310/downloads/75557/
If the switcher was NOT available in the User dropdwn menu then it is now
If the switcher was already available in the User dropdwn menu thenthere is no change
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql |
Labels |
Added:
PR-5.1-dev
|
How I tested:
When using the Patchtester to test this PR, I didn't get the Dark Mode switch in the User Menu. Only when I patched the database manually with phpMyAdmin, I got the switch.
i doubt this can be tested with patchtester and it definitely cannot be tested using datatbase structure fix as this is not a structure change
. Only when I patched the database manually with phpMyAdmin, I got the switch.
Do you mean you edited the field OR you ran the sql query
I directly edited the field in the database with phpMyAdmin.
I directly edited the field in the database with phpMyAdmin.
can you also test by using the sql directly in the phpmyadmin query window. Remembering to update the query with your own db prefix
First test: I updated the database by directly applying the SQL to it. After that, I navigated to the System Dashboard to have the database checked automatically. Back to the Home Dashboard and checked the User Menu: The menu item for Dark mode is visible and working.
Removed the value from the database again. System Dashboard - Home Dashboard - Check: The menu item is gone again.
The database check is of NO use to you - it only checks database STRUCTURE. It does nothing for database CONTENT.
Please just follow the test instructions
With the prebuilt package, the menu item is visible.
I have tested this item ✅ successfully on 769ff95
I have tested this item ? unsuccessfully on 769ff95
postgresql update fails:
2024-04-19T13:50:45+00:00 INFO XXX update The current database version (schema) is 5.1.0-2024-03-28.
2024-04-19T13:50:45+00:00 INFO XXX update Ran query from file 5.1.1-2024-04-18. Query text: UPDATE "#__template_styles" SET "params" = jsonb_set("params", '{colorScheme}', .
2024-04-19T13:50:45+00:00 INFO XXX update JInstaller: :Install: Error SQL 42601, 7, ERROR: syntax error at or near "$1"
LINE 4: AND NOT ("params" -> 'colorScheme' $1 'os');
^
2024-04-19T13:50:45+00:00 INFO XXX update End of SQL updates - INCOMPLETE.
@heelc29 @brianteeman I will review the update SQL script for PostgreSQL as soon as I can find the time, either today or tomorrow. Stay tuned.
P.S.: For PostgreSQL it should be done similar to here https://github.com/joomla/joomla-cms/blob/5.1-dev/administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-08-21.sql .
... sorry I dont have the time today
... sorry I dont have the time today
@brianteeman No problem. I will prepare code review suggestions so you can apply them with a click tomorrow.
Review done. The update SQL script for MySQL is fine. For the PostgreSQL script I have made 2 change suggestions and not only one for better explanation.
I allow myself to commit my suggestions as Brian is not available today.
I've restored @dautrich 's test result in the issue tracker as the test was made with MySQL (or MariaDB), and the changes after that test only changed the update SQL script for PostgreSQL.
@heelc29 Could you test again with PostgreSQL? Now it should work. Thanks in advance, and thanks for testing with PostgreSQL in general. That's much appreciated.
I have tested this item ✅ successfully on 1ea19d6
I have tested this item ✅ successfully on 1ea19d6
I've verified with both MySQL and PostgreSQL that the SQL from the corresponding update SQL script successfully adds the value if it is missing and does not do anything if the value is already there.
Status | Pending | ⇒ | Ready to Commit |
RTC
Thanks @richard67 !!!
Labels |
Added:
RTC
bug
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-04-23 13:14:27 |
Closed_By | ⇒ | wilsonge |
Thanks!
I have tested this item ? unsuccessfully on 769ff95
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43310.