? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
14 Jun 2019

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

  1. Be sure that you have 2 menus.
  2. Create a menu item in one menu and another item in the same menu as a child of the first.
  3. Edit the first menu item and change the menu that this item belongs to.

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.

avatar Hackwar Hackwar - open - 14 Jun 2019
avatar Hackwar Hackwar - change - 14 Jun 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jun 2019
Category Administration com_menus
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 15 Jun 2019

@RoterNagel @justinherrin please test.

avatar richard67
richard67 - comment - 16 Jun 2019

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.

avatar richard67 richard67 - test_item - 16 Jun 2019 - Tested successfully
avatar infograf768 infograf768 - change - 17 Jun 2019
Labels Added: ?
avatar uglyeoin
uglyeoin - comment - 17 Jun 2019

Once I get a J4 install up and running I will test this

avatar uglyeoin
uglyeoin - comment - 18 Jun 2019

I have tested this and I have some questions.

Scenario:

Menu 1.
Parent 1

  • Child 1
    -- Child 3

Menu 2
Parent 2

Batch move Child 1 to Parent 2. Works.
Go into Child 1 and move to Parent 1 using sidebar menu (not batch). Leaves child 2 behind but they are still part of parent 2.
Move Child 1 from Parent 1 BACK to Parent 2. Child 2 now becomes a child of Child 1 again.

This is confusing and I'm not sure it's the right action. Can someone else please sanity check my work?

avatar richard67
richard67 - comment - 18 Jun 2019

@uglyeoin

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.

avatar richard67
richard67 - comment - 18 Jun 2019

@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.

avatar uglyeoin
uglyeoin - comment - 18 Jun 2019

Sorry my bad, I haven't added the patch. Rushing too much. I will try again

avatar richard67
richard67 - comment - 18 Jun 2019

No problem.

avatar richard67
richard67 - comment - 18 Jun 2019

@uglyeoin If you want to test on current 4.0-dev branch and so pulled the latest changes, made a composer install and an npm install, and then want to start to set up the site and see only an empty page: Is a know issue, PR is in progress: See #25261 . Edit: PR #25261 is merged, so after pulling latest changes and running composer install and npm install , installation should work.

avatar richard67
richard67 - comment - 18 Jun 2019

I have tested this item successfully on 58146b6

Tested again after recent commit. Still works.

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.

avatar richard67
richard67 - comment - 18 Jun 2019

I have tested this item successfully on 58146b6

Tested again after recvent commit. Still works.

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 changing in the menu item edit view the parent menu item of as 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.

avatar richard67 richard67 - test_item - 18 Jun 2019 - Tested successfully
avatar alikon
alikon - comment - 18 Jun 2019

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.

avatar alikon alikon - test_item - 18 Jun 2019 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Jun 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Jun 2019

Status "Ready To Commit".

avatar richard67
richard67 - comment - 18 Jun 2019

@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.

avatar Hackwar
Hackwar - comment - 18 Jun 2019

No, it doesn't have to change the lft and rgt values. Further issues should be fixed in other PRs.

avatar richard67
richard67 - comment - 18 Jun 2019

@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.

avatar richard67
richard67 - comment - 18 Jun 2019

@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?

avatar infograf768 infograf768 - change - 18 Jun 2019
Labels Added: ?
avatar uglyeoin
uglyeoin - comment - 19 Jun 2019

@richard67 that's weird. But a bit lucky that I discovered it. I have created a new issue here #25270

avatar roland-d roland-d - change - 23 Jun 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-06-23 08:40:51
Closed_By roland-d
avatar roland-d roland-d - close - 23 Jun 2019
avatar roland-d roland-d - merge - 23 Jun 2019
avatar roland-d
roland-d - comment - 23 Jun 2019

Thank you.

Add a Comment

Login with GitHub to post a comment