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
Saving a page in a "normal" mode messes up visibility for logged-in users #228
Comments
Not sure what is merging in the configuration. Are you running any extra plugins? |
I first noticed this behavior using SEO plugin (that's why I was switching from expert to normal and back), but I managed to replicate this bug using a fresh grav instance, so Admin Panel, Email, Error, Form, Login, Markdown Notices and Problems plugins, nothing extra. |
I will try to reproduce but that merge behavior is definitely weird. Does look like a 3rd party plug-in is doing it. |
That bug is not present in 1.7.0-beta.10 with Login v3.0.4 but Grav 1.6.16 with Login v3.0.3 and 3.0.4 both have this issue. |
Same issue here with Grav v1.6.24, Admin v1.9.14 and Login v3.3.0. Looks like it happens in "mergeConfig" used in "pageVisibility" called during "onPagesInitialized": Changing the line Line 213 in 73c2238
to
the issue is gone, but it breaks "parent_acl" check for page visibiltiy: grav-plugin-login/classes/Login.php Line 617 in 740b1fd
Hence this is a hint, not a fix... |
I'm unable to recreate this in 1.6 or 1.7rc with Login v3.4.0. I really think that it's the fault of the SEO plugin you guys are using. Probably it doesn't happen in 1.7 because it doesn't fire the same events that 1.6 does on page save, and the SEO plugin is making it's changes. |
Arggg.. was able to reproduce it and fix. Only happened in Grav 1.6 BTW, Grav 1.7 handles this better. |
Signed-off-by: Andy Miller <rhuk@mac.com>
When visibility_requires access is set in a page frontmatter using an "expert" editing mode in admin plugin, everything works fine. Here's a working example:
However, when an expert mode is switched to normal, then the page is saved (with or without making any changes to its contents), it starts to appear in menu for all guests. Frontmatter is automatically being changed to include overrides:
A temp fix is to switch back to expert mode, delete four spaces in front of
leaving only four, and save again, or remove everything in a login: section leaving only
with four spaces.
The config that is pasted into the page frontmatter is coming from user/config/plugins/login.yaml
Similar behaviour was also described in this issue: #166 (comment)
The text was updated successfully, but these errors were encountered: