statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

CP Nav Child Items not showing up #2391

Closed NA-Dev closed 5 years ago

NA-Dev commented 5 years ago

Describe the bug Nav Items for Configure User Groups and User Roles are not showing up for a super user. I also cannot display nav sub-items made with a custom add-on. The child ul and li elements are there, but they are hidden and there is no way to expand the top level ul.

To Reproduce Steps to reproduce the behavior:

  1. Create site and super user
  2. Loof for Configure > Users > Roles

Expected behavior I can see the nav item or can expand the top level.

Screenshots

Nav

Environment details (please complete the following information):

NA-Dev commented 5 years ago

Nevermind, the only issue is that unsecured Valet sites do not have a url that matches during this check. I just used valet secure to secure the site while I am developing.

function nav_is($url) { $current = URL::makeAbsolute(URL::getCurrentWithQueryString());

return $url === $current || Str::startsWith($current, $url . '/');

}