J3 Issue ?
avatar chetanmadaan
chetanmadaan
21 Dec 2017

Steps to reproduce the issue

Create a parent menu item with access registered. (You can see 139 is the parent menu item and 140 is the sub menu item)
image

Create a sub menu with with access public. (You can see Parent menu access it registered and sub menu is public.)
image

Access the sub menu item using direct link in this case

index.php?option=com_content&view=article&id=3&Itemid=140
You will see the sub menu items under HTML structure appears under a different parent menu item.
Appears as this:
image

HTML as this:

You can see Item id 140 is now showing as a child menu item of 127 where as it's child of 139
image

Expected result

Sub menu item should either not appear at all or appear with the current structure but NOT under the incorrect menu item.

Actual result

Sub menu items appears under a different menu item.

System information (as much as possible)

Joomla 3.8.3 running with PHP 5.6 with Prostar template.

Additional comments

Original Post at: https://forum.joomla.org/viewtopic.php?f=706&t=957704&p=3506729#p3506729

avatar chetanmadaan chetanmadaan - open - 21 Dec 2017
avatar joomla-cms-bot joomla-cms-bot - change - 21 Dec 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Dec 2017
Category ACL com_menus
avatar joomla-cms-bot joomla-cms-bot - edited - 21 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Dec 2017
Title
Public Submenu under Registsred parent menu visible in incorrect place.
Public Submenu under Registered parent menu visible in incorrect place.
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Dec 2017
Status New Confirmed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Dec 2017

Issue confirmed (Screenshots aren't by 3.8.*, looks like 3.6).

System information

3.8.4-dev
Multilanguage Site (4 Lang.) & Test English (GB) Sample Data
macOS Sierra, 10.12.6
Firefox 57 (64-bit)

MAMP 4.2

avatar chetanmadaan
chetanmadaan - comment - 21 Dec 2017

Thank You! I was running 3.6 but wanted to report this with the latest version. Ran the update but screenshots must have been before.

I just double checked and it's the same behavior on 3.8.3 as well.

avatar brianteeman
brianteeman - comment - 21 Dec 2017

I can confirm this behaviour - to be perfectly honest I dont see how it can be fixed. For my own site where I had this I just made sure that the submenu items were set to the same access level or higher than the parent

avatar chetanmadaan
chetanmadaan - comment - 21 Dec 2017

Understood! May be forcing the sub menu item to be hidden by default (if parent == less access than available) or something like that.

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar barrycox
barrycox - comment - 29 May 2018

This is a really major bug (imho - for MY usecases). i have a 'large' (like 40 items on 3 levels, so not out of line...) menu trees on a backend/internal application where my users have 15 different access levels to give them access to the right menu items and sub-menus.

Registered and guest is the most simple use-case, but actually, ANY menu item where the person logged on doesn't have access to the parent menu item but does have access to the sub-item, the entire menu after that item is messed up with levels all over the place. and these issues are hard to diagnose given the robust security model.

the behavior I WOULD prefer is to EITHER:

  1. MY PREFERENCE: process the parent (that the user doesn't have access to) like a menu separator type so at least they can see the sub menu item under the intended menu. since its a separator, they can't click on the parent (in case it's something they shouldn't have access to). that gives them access to the menu intended AND (most importantly) doesn't mess up the menu hierarchy. This is probably the most intuitive behavior to the end user (imho). as a slight mod to this solution, you could change the parent to 'NOACCESS' to obscure it. so the user would report it hopefully and not see the NAME even of the parent menu.
  2. ALSO A FINE SOLUTION and chetanmadaan's idea: Don't display the submenu item at all when the user DOES have access to the submenu unless the user also has access to every branch up the tree that the submenu is on. That is more secure (the user can't see the parent exists even though they can't click on it) and doesn't mess up the menus either. downside = it leaves the admin/user to discover why it's not displaying... which will be an FAQ i'm sure...
  3. Could also display the subitem at the peer-level of the last item they DID have access to. so elevate it up a notch on the menu so it is displayed on it's own then keep track of which are level 1, 2 and 3 going forward. (sounds difficult but the most intutive).
  4. I DONT THINK YOU Could display an error message when saving the subitem on administrator. The error would be that that the parent has a more restrictive access so you can't save it. I don't think this is possible because with access levels, it could be venn diagram where some users do have both, some have one some have the other.... SO I THINK it has to be handled in the menu view for the front end in one of the 3 ways above (or probably others).

I know it seems obscure, but i can't tell you how many times this has bit me when adding new menu items to my 30+ joomlas and not remembering to (researching) the access so that the menu item will display to all access levels. it would be SO much more user-friendly if this was done dynamically.

I have never contributed to the joomla code-base, but am happy to have my developer develop this change and submit it if you would want.

avatar Quy
Quy - comment - 29 May 2018

I have never contributed to the joomla code-base, but am happy to have my developer develop this change and submit it if you would want.

@barrycox Please do. Thanks.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2019
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2019-03-20 16:19:12
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 20 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Mar 2019
Closed_Date 2019-03-20 16:19:12 2019-03-20 16:19:13
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 20 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Mar 2019

closed as having Pull Request #24266

Add a Comment

Login with GitHub to post a comment