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) :
When clicking on a publish/unpublish button of a menu item, you would expect to only affect the chosen element (not its childs).
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)
Build | 3.4.1 | ⇒ | staging |
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.
Status | New | ⇒ | Confirmed |
Labels |
Added:
?
|
@DanielvanBavel any updates on this? Not sure what you are planning to work on?
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?
By the way... the PR should be developed using the staging branch or the 3.6.x branch?
staging branch
Thanks!
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-16 07:53:07 |
Closed_By | ⇒ | gunjanpatel |
Set to "closed" on behalf of @gunjanpatel by The JTracker Application at issues.joomla.org/joomla-cms/7018
Closing as we have PR #13242 for this issue.
Labels |
Removed:
?
|
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.