Upgrade from Joomla 3.4.8 to Joomla 3.5 on a very long living site.
The title of admin menu item with title "com_contact" is renamed to "com_contact_contacts".
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".
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.
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.
Please propose a PR.
If you can't do a PR, please let it know. Somebody else will do as the proposal above makes sense.
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
;
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
SETtitle
= 'com_contact_contacts' WHEREid
= 8;
+ UPDATE#__menu
SETtitle
= 'com_contact_contacts' WHEREclient_id
= 1 ANDlevel
= 2 ANDtitle
= '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';
ok.. I didn't realize it was based on alias field. Thanks for catching that.
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.
@infograf768 @ratenfanger PR for this issue #9679
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-30 19:50:29 |
Closed_By | ⇒ | brianteeman |
closed as we have a PR
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.