Skip to content

Title of wrong menu item changed for com_contact#9679

Merged
Kubik-Rubik merged 1 commit intojoomla:stagingfrom
wojsmol:updsqlfix
May 7, 2016
Merged

Title of wrong menu item changed for com_contact#9679
Kubik-Rubik merged 1 commit intojoomla:stagingfrom
wojsmol:updsqlfix

Conversation

@wojsmol
Copy link
Copy Markdown
Contributor

@wojsmol wojsmol commented Mar 30, 2016

Pull Request for Issue #9525

Original issue description

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.

@andrepereiradasilva
Copy link
Copy Markdown
Contributor

and how do we test the PR?

@infograf768
Copy link
Copy Markdown
Member

PR makes sense imho.
To test, I guess one has to change the id of this submenu to anything else than 8 on a 3.4.8 and then update with this PR included in the 3.5.x update pack.

@Luchen6
Copy link
Copy Markdown

Luchen6 commented Apr 15, 2016

I have tested this item ✅ successfully on 84bed54

Same is true for the frontend menu
The title of the menu item 8 has changed to 'com_contact_contacts' after update from 3.4.8 to 3.5.0 and 3.5.1


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

@alikon
Copy link
Copy Markdown
Contributor

alikon commented May 7, 2016

I have tested this item ✅ successfully on 84bed54

i was unable to reproduce upgrading from 3.4.8. to 3.5.x even changing the menu item from 8 to 88888 before upgrading, so i think this issue only happens when you have started from an old site like (1.5 as already reported),

so based on code review seems good to me cause the where condition make more sense


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

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented May 7, 2016

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 7, 2016
@Kubik-Rubik Kubik-Rubik added this to the Joomla 3.6.0 milestone May 7, 2016
@Kubik-Rubik
Copy link
Copy Markdown
Member

Thank you @wojsmol and testers!

@Kubik-Rubik Kubik-Rubik merged commit c10a902 into joomla:staging May 7, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 7, 2016
@wojsmol wojsmol deleted the updsqlfix branch May 7, 2016 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants