I have a couple of links to pages that users with certain roles cannot access. Instead of completely invisible in the menu to these users, as standard Drupal treatment for links to pages like these (confirmed to be consistent when the menu list is put anywhere else), these links show up on Ultimenu with the word 'Inaccessible'.

Any insight on how to fix this?

Thanks.

Comments

erjuni created an issue. See original summary.

erjuni’s picture

Just wanted to add that this is also what happens with '/user/login' and '/user/logout' links. Normally Drupal will show you 'user/login' link when you're logged out, and '/user/logout/' when you're logged in. In Ultimenu if you're logged in, the login menu still shows up, but as 'Inaccessible'.

gausarts’s picture

Status: Active » Needs review
StatusFileSize
new1.09 KB

Thanks for the report.

Attached to ignore those "inaccessible" links.

gausarts’s picture

Normally Drupal will show you 'user/login' link when you're logged out, and '/user/logout/' when you're logged in.

This part is incorrect.
Try adding a new _custom link (/user/login or /user/logout) outside Ultimenu, you will see the same behaviors.

erjuni’s picture

Thank you for the patch! Links are now showing/not showing appropriately as permitted.

Is there any special treatment for user with administrative privilege? Obviously an admin will have access to all pages and therefore all links, but in this case it is specifically for the 'login' and 'logout' links I mentioned. Currently (after patching), admins still see both 'login' and 'logout' links.

I may not be entirely accurate when describing the login/logout situation and mistakenly generalized a localized issue, but what I have tried is putting both the 'login' and 'logout' link on the built-in menu block in Zircon theme (as is, without ultimenu), and the links are shown appropriately (only shows 'log in' when logged out, and vice versa). And this works consistently for all users, whether anonymous, logged in users, or admins.

gausarts’s picture

Thank you.

I haven't been able to reproduce the last issue, sorry.

I used any other public facing menu via Drupal UI.
In my case both links behave similarly either with or without Ultimenu:

Admin always sees 'login' link, only redirected to user page when clicked.

I also noticed, I cannot re-edit the link (/user/login) once saved.
But this one is more about core Drupal issue, anyway.

Since the links behave similarly when using other menus via Drupal UI, this is not specifically Ultimenu issue.

Feel free to provide steps to reproduce it using Drupal UI for just in case I missed the obvious.

  • gausarts committed 88a2c54 on 8.x-1.x
    - #2801355 by erjuni: Links are shown as '\''Inaccessible'\'' for users...
gausarts’s picture

Status: Needs review » Fixed

The original issue is fixed. If you still have an issue with the other one, please create a new issue. And kindly provide steps to re-produce it if you do.

Committed. Thank you for contribution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.