User tests: Successful: Unsuccessful:
Pull Request for Issue #150
Updates the default collation for new installations to utf8mb4. Added an update script (version 3.5.1) for previous installations.
Installing:
Just build the Web Links package (or use the attached one) and install normally.
Updating:
Build the package with version 3.5.1 in jorobo.ini
(or use the attached one) and update with the Joomla! installer. Check if the collation of #__weblinks and the alias column has changed.
You don't need to do this as a complex conditional in your PHP update script. You can make it a regular SQL schema update and since the MySQL drivers downgrade gracefully from utf8mb4 to utf8 if the former's support isn't there you don't need to do any conditionals around things.
See BabDev/Podcast-Manager@39e8904 for how I did it in an extension.
The core does it in a massively complex way for reasons I never fully grasped or paid attention to. At an extension level, if you have to do it with PHP scripts then you're doing something majorly wrong.
Ok sorry I don't know that behaviors in the MySQL servers.
Okay reverted back to initial version
I have tested this item
New install and upgrade both work correctly.
I have tested this item
What will happen if a < 3.6.0 site updates weblinks with a change to utf8mb4 ?
Technically this would only be valid against a Joomla 3.5 or later install. So an install script and the update server definition should limit presenting this update to only those versions (i.e. Joomla 3.4 shouldn't be able to update to it).
Okay if you want i go and change that a third time (had that check already in script.php..).
@mbabker @chrisdavenport @infograf768 Any plans for how long Weblinks should support < 3.5.0 installs?
It shouldn't have to.
So all we need to do is bump the version requirement in the XML files to 3.5 then?
@javigomez Done, passing now :)
This PR has received new commits.
This PR has received new commits.
I have tested this item
I have tested this item
@yvesh what is about the mysql versions (client & server) that can't handle uft8mb4?
see: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/script.php#L1684-L1805