-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
visibility_requires_access does not work in 1.7 #3176
Comments
@mahagr Were you able to reproduce this Matias? |
The feature requires |
@rhukster This feature has nothing to do with Grav 1.7, in fact, login plugin is the only one that uses the feature at all. |
But when I change this is login.yaml it doesn't make a difference
Tested it with default theme, same issue. Didn't have it before upgrade though |
@rhukster can you confirm this is not just my problem? I would like to push 1.7 to my live site but I need this feature to work. Some menu items should be hidden from public Something I don;t understand. In my live site 1.6 login.yaml the feature plugins.login.dynamic_page_visibility has a default value false, yet it works perfectly. On staging 1.7 both false and true do not work. |
It's got something to do with caching. Whenever I disable cache in 1.7 it works flawlessly |
Hi, I'm facing the same issue (v1.7.0-rc.20 theme: Learn2 Git Sync v1.6.0) my menu entry:
The plugin login configuration (v3.3.8): Current behavior: After a refresh the menu disappear then finally reappear during navigation... Expected behavior: The menu should be hidden until the user directly access the URL and authenticate. |
Visibility in Grav means if it should show up in the menu or not. So this functionality does as it's supposed to do, by hiding the menu item if you don't have access to the page. If you do have access (ie, you are logged in), then you do see it. Imagine it's something like "orders" or "profile". |
This is the point : not logged in and I see the menu entry. |
I cannot replicate that. I have in dynamic_page_visibility: true Then in my page md: title: Special
login:
visibility_requires_access: true
access:
site.special: true And i can't see this page in the menu until i login with a user that has What version of Grav + Login are you using? |
Thanks for trying. Version numbers are in my previous post |
Indeed exactly what happens with me. Same versions. At first it looks like it is working. But when you refresh all items reappear. And I am not logged in. Only way to prevent this is disabling all caching. |
I couldn't replicate this either. Let's try to track this one down. Is there anything special in the server? AWS? Also have you updated from some older 1.7 version with Flex Pages enabled in the site (admin is fine)? We hid that feature because of it was still having issues like this. |
What I did: Copy production to development. On a local virtualbox running Ubuntu 20.04 / Apache 2.4 / PHP Version 7.4.11 / I also tried upgrading the site on my Linode production server running Ubuntu 20.04 / Apache 2.4 / PHP Version 7.4.11 Tried it both with the default theme as my personal theme, same issue Servers are completely standard I did not enable flexpages I will try to install a perfectly clean GRAV cms next weekend, and built the site back up one step at the time |
I'm on Ubuntu, too, though I have custom PHP versions -- though none of this should matter, it's not about servers, IMHO. I'm using default PHP configuration, so opcache and acpu settings should be the same. Caching setting is grav default, so using apcu. Maybe it would help if you could replicate this in plain grav+admin installation... |
My workflow was the following:
I only use the web admin. I won't use the command line as the access to command line is complex and filtered in my GCP environment. It should be more easy to reproduce as docker permits to reduce the numbers of things that could impact the feature... EDIT : With the latest admin panel version: v1.9.19 I cannot view anymore the "access" features of pages... No more visible option to hide the pages in the menu, no login option... Is it expected ? |
I cannot get this to work. Bit of a problem, because I can't upgrade now :( Hidden nav items really should stay hidden in my case, not reappear after a refresh. Tested it with all lastest versions of core and plugins |
I seem to be having the same issue as Japhys, and just as he mentioned earlier disabling Caching fixes the issue. dynamic_page_visibility and visibility_requires_access is set to true yet the page still shows up in the menu when not logged in. Mine is a clean install of Grav + admin with only user/pages being migrated over from a previous install. Grav v1.7.3, Admin v1.10.2 |
I was able to figure out what was going on and fix the bug. |
Good news! Thanks |
I manually made the changes in the commit and confirmed it works. Thank you. |
Hi I am testing my site with 1.7 and while visibility_requires_access: true worked perfectly in 1.6 it does not seem to work in 1.7
Option has been enabled on plugin conf page
Frontmatter has:
Has something else changed?
The text was updated successfully, but these errors were encountered: