?
Referenced as Pull Request for: # 13242
avatar woluweb
woluweb
23 May 2015

Steps to reproduce the issue

Go to Menu Manager.
Choose a menu where some menus have submenus
Take a menu item having several child items, some being published others unpublished
If you unpublish the parent item, all child items are also automatically unpublished.
The other way round : iff you then publish the parent item, all child items are automatically published.
With other words, you "loose" the status of all childs items (very annoying when you temporarily unpublish a menu item. If its child items had diverse status, you will never know again what their status was...)
Illustration (before/after) :
screen shot 2015-05-23 at 12 43 14
screen shot 2015-05-23 at 12 44 02

Expected result

When clicking on a publish/unpublish button of a menu item, you would expect to only affect the chosen element (not its childs).

Actual result

When clicking on a publish/unpublish button for a menu item, all its childs take the same status
Note that if you really EDIT the parent menu item and change there its status, when saving it does not affect the status of its child items (which is the expect result)

System information (as much as possible)

Additional comments

Votes

# of Users Experiencing Issue
3/3
Average Importance Score
4.00

avatar woluweb woluweb - open - 23 May 2015
avatar woluweb woluweb - change - 23 May 2015
Build 3.4.1 staging
avatar brianteeman
brianteeman - comment - 23 May 2015

I believe it is CORRECT and logical behaviour that if you unpublish a parent menu item that all submenus are also unpublished.

However I agree that it is not correct or logical that if you then publish a parent item all the submenu items are also published


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

avatar woluweb
woluweb - comment - 23 May 2015

Txs Brian for the quick feedback.
I understand your point of view in the sense that : "if a parent menu item is unpublished, the front-end should not show it of course, nor its child items... whatever their status".
[ And I do agree that, in a ideal world, people should even never have "unpublished" items if they want everything clean & tidy :-) ]

But being in backend, in many sites it happens many times that you have some unpublished menu items. And it is very confusing that Joomla takes initiative : you only publish/unpublish a menu item and -without any notice- all its childs get impacted.
(On top of that : if you edit the parent menu item and change its status there, its childs are not affected)
Personally, if I want to change the status of several items in Menu Manager, I simply tick each of them.


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

avatar brianteeman brianteeman - change - 18 Mar 2016
Status New Confirmed
avatar rdeutz rdeutz - change - 17 Aug 2016
Labels Added: ?
avatar sanderpotjer
sanderpotjer - comment - 4 Nov 2016

@DanielvanBavel any updates on this? Not sure what you are planning to work on?


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

avatar jlainezs
jlainezs - comment - 14 Dec 2016

The "problem" is that the publish button on the row it ends calling JTableNested::publish which updates the item and its children, while when editing the item it only saves the state.
To have the same behaviour on both cases I think the call to parent::publish on com_menus/models/item.php (around line 1631) should be changed
with a simple update of the given pk's and then return the result of the update. I can prepare a PR with this modification.
Any comments?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/7018.
avatar jlainezs
jlainezs - comment - 14 Dec 2016

By the way... the PR should be developed using the staging branch or the 3.6.x branch?


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Dec 2016

staging branch

avatar jlainezs
jlainezs - comment - 14 Dec 2016

Thanks!


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

avatar gunjanpatel gunjanpatel - change - 16 Dec 2016
The description was changed
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2016-12-16 07:53:07
Closed_By gunjanpatel
avatar joomla-cms-bot joomla-cms-bot - edited - 16 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - close - 16 Dec 2016
avatar joomla-cms-bot
joomla-cms-bot - comment - 16 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - close - 16 Dec 2016
avatar gunjanpatel
gunjanpatel - comment - 16 Dec 2016

Closing as we have PR #13242 for this issue.


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

avatar zero-24 zero-24 - change - 20 Jan 2017
Labels Removed: ?
avatar zero-24 zero-24 - unlabeled - 20 Jan 2017

Add a Comment

Login with GitHub to post a comment