-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Fixing children when changing menu of menu item #25205
Conversation
@RoterNagel @justinherrin please test. |
I have tested this item ✅ successfully on f53c3a9 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25205. |
Once I get a J4 install up and running I will test this |
I have tested this and I have some questions. Scenario: Menu 1.
Menu 2 Batch move Child 1 to Parent 2. Works. This is confusing and I'm not sure it's the right action. Can someone else please sanity check my work? |
Well, first of all your menu strtucture show "Child 3" and not "Child 2", but in the text below you write about "child 2" and not "child 3" => inconsistent => Gives a bad impression about sanity and carefulness. |
@uglyeoin Beside the inconsistency mentioned above, it seems you misinterpreted the purpose of this PR. You write something about "Batch copy .. works". But that is not subject of this PR. This PR deals with moving a menu item and its children from one menu to another by editing the menu item properties and there changing the menu to which the menu item belongs to. It does not deal with changing the parent menu item for that menu item, neither in batch nor in editing menu items. @Hackwar Correct me if I'm wrong. |
Sorry my bad, I haven't added the patch. Rushing too much. I will try again |
No problem. |
@uglyeoin |
I have tested this item ✅ successfully on 58146b6 Easy to test with Patchtester Component and with Blog Sample Data installed. With the PR applied, changed menu for "Working on Your Site" from "Author Menu" to "Main Menu Blog" in the menu item edit view and then "Save & Close". Result: Menu items for "Main Menu Blog" are shown in the menu items list. The menu item and the 2 children "Site Settings" and "Template Settings" have been moved to that menu. (Without the PR, the child items were left alone and not moved with the parent). Note that there is the same issue when in the menu item edit view changing the parent menu item of a menu item which has children. This is not subject of this PR here but should be corrected with another, future PR. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25205. |
I have tested this item ✅ successfully on 58146b6 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25205. |
Status "Ready To Commit". |
@Hackwar Question: Should the lft and rgt values also be changed when moving a menu item with children from one to the other menu like with this PR? And when moving a menu item with children from 1 to another parent menu item as I wrote above to be done for another PR? Or will lft and rgt be updated when saving the changed menu item? I hope that will be the case. |
No, it doesn't have to change the lft and rgt values. Further issues should be fixed in other PRs. |
@Hackwar Ok. I will try to make a PR for the parent menu item changing thing in the same way as you did this here for the menu changing. |
@uglyeoin I can confirm your finding, also with this PR aplied. But I think it is a separate issue. I had it with and also without this PR applied. Do you want to open a new issue for it? |
@richard67 that's weird. But a bit lucky that I discovered it. I have created a new issue here #25270 |
Thank you. |
Pull Request for Issue #7579.
Summary of Changes
When a menu item has child-menu items and its menu is being changed, the children should change their menu as well. Right now this is not the case.
Testing Instructions
Expected result
The menu item and all its children are changed to the new menu and remain in their former structure.
Actual result
The first menu item is changed over, the children stay in the original menu.
This fixes a really old issue (#7579), so please help out to test this and fix this long term issue.