?
Referenced as Pull Request for: # 9679
avatar ratenfanger
ratenfanger
22 Mar 2016

Steps to reproduce the issue

Upgrade from Joomla 3.4.8 to Joomla 3.5 on a very long living site.

Expected result

The title of admin menu item with title "com_contact" is renamed to "com_contact_contacts".

Actual result

The title of a menu item which is used on the frontend (title = 'Geschiedenis') is renamed to "com_contact_contacts". That means the main menu on my site now contains a item with title "com_contact_contacts".

System information (as much as possible)

  • Upgrade from 3.4.8 to 3.5
  • Long living installation, migrations and upgrades since Joomla 1.5
  • Using MySQL database
  • The IDs of the backend menu items (client_id = 1) are not equal to the ones in a clean Joomla installation.

Additional comments

Issue is caused by #8212 which uses a hardcoded menu item ID (8) to update the menu item title. Menu item ID 8 may be used for another than the meant one.

Fix proposal

I think other people with (somehow) non-default menu item IDs may/will have the same problem. My proposal is to only change the title for menu items which matches the follow criteria:
a) only backend menu items (client_id = 1)
b) with title = 'com_contact'
c) in a submenu (level = 2)

For MySQL the following query does the job from phpMyAdmin:
UPDATE jml_menu SET title = 'com_contact_contacts' WHERE client_id = 1 AND level = 2 AND title = 'com_contact'

If you agree I wil be happy to change the queries and submit another PR. I also can help testing for MySQL because I did not upgrade my production installation yet.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar ratenfanger ratenfanger - open - 22 Mar 2016
avatar syntaxerror
syntaxerror - comment - 23 Mar 2016

I can confirm this issue, as it happened to one site I updated yesterday.
Don't recall how old it is, but it has at least been started on 2.5 (maybe it was 1.5), then migrated and updated to resent versions along the way.

avatar infograf768
infograf768 - comment - 23 Mar 2016

Please propose a PR.

avatar infograf768
infograf768 - comment - 24 Mar 2016

If you can't do a PR, please let it know. Somebody else will do as the proposal above makes sense.

avatar N6REJ
N6REJ - comment - 24 Mar 2016

I think the proper solution is to change the update.sql's from
+UPDATE "#__menu" SET "title" = 'com_contact_contacts' WHERE "id" = 8;
to
+UPDATE "#__menu" SET "title" = 'com_contact_contacts' WHERE "path" = Contact/Contact AND "title" = com_contact;

avatar ratenfanger
ratenfanger - comment - 24 Mar 2016

I don't think that is correct @N6REJ, the discription of the path field is: The computed path of the menu item based on the alias field. It looks like this value may also been customized by migrations, as my path is Contacts/Contacts~.

I think my propsal is better because it doesn't check for fields which may be altered by users.

Sorry @infograf768, I don't have time to make a PR before my easter holiday. Maybe someone else can do it?

MySQL (tested):

- UPDATE #__menu SET title = 'com_contact_contacts' WHERE id = 8;
+ UPDATE #__menu SET title = 'com_contact_contacts' WHERE client_id = 1 AND level = 2 AND title = 'com_contact';

PostgreSQL (untested):

- UPDATE "#__menu" SET "title" = 'com_contact_contacts' WHERE "id" = 8;
+ UPDATE "#__menu" SET "title" = 'com_contact_contacts' WHERE "client_id" = 1 AND "level" = 2 AND "title" = 'com_contact';

SQL Azure (untested):

- UPDATE [#__menu] SET [title] = 'com_contact_contacts' WHERE [id] = 8;
+ UPDATE [#__menu] SET [title] = 'com_contact_contacts' WHERE [client_id] = 1 AND [level] = 2 AND [title] = 'com_contact';

avatar N6REJ
N6REJ - comment - 24 Mar 2016

ok.. I didn't realize it was based on alias field. Thanks for catching that.

avatar artisanwebandprint
artisanwebandprint - comment - 30 Mar 2016

I just updated around 100 sites to Joomla 3.5 and I'm finding it present on sites that are both original 1.5 sites that have been migrated over the years. The title of the menu item is changed to com_contacts_contacts.

In both sites the ID was 8.

In one site the type was a com_contact, in another the type was a single article.


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

avatar wojsmol
wojsmol - comment - 30 Mar 2016

@infograf768 @ratenfanger PR for this issue #9679

avatar brianteeman brianteeman - change - 30 Mar 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-03-30 19:50:29
Closed_By brianteeman
avatar brianteeman brianteeman - close - 30 Mar 2016
avatar brianteeman brianteeman - close - 30 Mar 2016
avatar brianteeman
brianteeman - comment - 30 Mar 2016

closed as we have a PR


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

Add a Comment

Login with GitHub to post a comment