?
avatar zjw
zjw
11 Nov 2015

To test:

  1. Begin by performing a clean install of Joomla! 3.4.5 on a server with a version of mysql that supports utf8mb4 (necessary because of #8267). Also install the "Test English (GB) Sample Data".

  2. Next, update the installation to 3.5.0-beta.

  3. Follow the original test instructions for issue 26929.

As was the case then, an error occurs:

Warning

Save failed with the following error: Another menu item with the same parent has this alias (remember it may be a trashed item).

Note that this issue does not occur if starting with a clean install of 3.5.0-beta. It only occurs when updating from a previous version.

A different test:

  1. Perform a clean install of 3.4.5 (as above).

  2. Follow the original test instructions for issue 26929 (while still on v. 3.4.5). The test passes.

  3. Attempt to upgrade to 3.5.0-beta.

Note the error:


Warning

Duplicate entry '0-1-presentation-*' for key 'idx_client_id_parent_id_alias_language' SQL=ALTER TABLE `fyu2o_menu` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Look at Extensions->Database. Note the errors:

    3 Database Problems Found.

    Database schema version (3.4.0-2015-02-26) does not match CMS version (3.5.0-2015-11-05).
    Table 'fyu2o_contentitem_tag_map' should not have index 'idx_tag'. (From file 3.5.0-2015-10-26.sql.)
    Table 'fyu2o_contentitem_tag_map' should not have index 'idx_type'. (From file 3.5.0-2015-10-26.sql.)

Tap the Fix button. Note the error (Incidentally, this error is not directly related to this issue. It's present on any update from 3.4.5 to 3.5 when using mysql. Nonetheless, it originates from the same conversion to utf8mb4 discussed below. It, however, is not fixed by the suggested fix further below. I guess it should be entered as another issue.):

    1 Database Problem Found.

    Table 'fyu2o_user_profiles' does not have column 'profile_value' with type 'TEXT'. (From file 3.3.4-2014-08-03.sql.)

Tap the Fix button again. No more errors shown. The database's structure is now fixed. But its data is damaged: plugin extension ID 453 is missing; it should have been added by administrator/components/com_admin/sql/updates/mysql/3.5.0-2015-10-13.sql.

The underlying cause of the regression is in administrator/components/com_admin/sql/updates/mysql/3.5.0-2015-07-01.sql (originating from #7173). On updating to 3.5.0, lines 13-20 convert tables to utf8mb4_general_ci collation. (Note that using utf8_general_ci was the original fix for issue 26929.) But once the columns are converted to utf8mb4_bin collation, their tables are converted to utf8mb4_general_ci collation later on in the file. For example:

ALTER TABLE `#__banners` MODIFY `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';

is followed with:

ALTER TABLE `#__banners` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

This resets the collation of column alias back to utf8mb4_general_ci.

Reordering the SQL statements should fix the immediate problem.

avatar zjw zjw - open - 11 Nov 2015
avatar infograf768
infograf768 - comment - 11 Nov 2015

Confirmed.

and also the different queries 255 vs 191 (here for _menu)

joomla.sql

alias' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'The SEF alias of the menu item.',

3.5.0-2015-07-01.sql

ALTER TABLE#__menuMODIFYaliasvarchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'The SEF alias of the menu item.';


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8374.

avatar infograf768 infograf768 - change - 11 Nov 2015
Priority Medium Urgent
avatar zero-24 zero-24 - change - 11 Nov 2015
Labels Added: ?
avatar infograf768
infograf768 - comment - 11 Nov 2015

Patch ready. Please test #8376

avatar infograf768 infograf768 - change - 11 Nov 2015
Category Installation Updating
avatar zero-24 zero-24 - change - 11 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-11 12:12:54
Closed_By zero-24
avatar zero-24 zero-24 - close - 11 Nov 2015
avatar zero-24 zero-24 - close - 11 Nov 2015
avatar zero-24
zero-24 - comment - 11 Nov 2015

Closing as the PR by @infograf768 gets merged ;)

avatar richard67
richard67 - comment - 11 Nov 2015

@zero-24 As @infograf768 mentioned in his PR #8376 not all problems mentioned here are solved:

This PR does NOT solve the other issue reported in #8374
i.e.

Table 'mytable_user_profiles' does not have column 'profile_value' with type 'TEXT'.

(From file 3.3.4-2014-08-03.sql.)

So why do you close this one here? It should remain open because partly solved only.

@zjw on cc.

avatar infograf768
infograf768 - comment - 11 Nov 2015

I think a new Issue should be created for that remaining issue.
Even more as my test show that we DO already have column 'profile_value' with type 'TEXT' in the _user_profiles
when installing a clean 3.4.5

avatar richard67
richard67 - comment - 11 Nov 2015

Ah, or is it maybe ok to close it because issue https://issues.joomla.org/tracker/joomla-cms/8267 is used for handling the rest?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8374.

avatar zjw
zjw - comment - 11 Nov 2015

As suggested, a new issue has been created: see #8385.

Add a Comment

Login with GitHub to post a comment