Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Private area not working

Started by alex 3 days ago · 2 replies · 85 views
3 days ago

Hello,

I would like to create a private area on my site. I am using Grav 2.1.6 with the Helios theme 2.1.17.

I followed the documentation at https://learn.getgrav.org/2/cookbook/general-recipes#create-a-private-area and added the following to the page's frontmatter:

YAML
access:
    site.login: true

The login is now enforced (nice!), but after logging in I only see an empty page with the heading "User Login", none of the page content is rendered.

How can I fix this?

Thank you for your help.

3 days ago

Hi Alex, check the Login plugin settings, specifically Options > Redirect to login and Options > Redirect after login and ensure they are set to Disabled.

2 days ago

Hi Vadym,

thanks for the reply. I had those options disabled but still got the same issue.
Anyway, I have somehow manged to get it to work, or get used to it, but it's still a bit weird :)

What i want to achieve:

I would like to have an area on my site with an internal area, where i will put some Guidelines in how to write content. I would like to show the "Internal Area" link in my main navigation, when a user is logged in and hide it for everyone else.

I have this in Frontmatter:

YAML
access:
  site.login: true
login:
  visibility_requires_access: true

Additionally the following non-default configurations:
Plugins -> Login -> Dynamic Page Visibility -> Enabled
Configuration -> System -> Session -> Session Split -> No

Now when i visit the page (with a clean browser cache), the "Internal Area" link is hidden (nice!).
I log into my admin area and visit my page again - the link is still hidden (why?)
If i visit the URL directly, i get a User login form, if i log in, the page is shown and if i hit F5, also the navigation updates.
Also when logout from the admin menu, the page stays visible.

It seems, that "Session Split = No" is not working correctly, or i may misunderstand it.
(i am using Admin2, if that matters)

My problem is now more or less solved, i just want to point out that "Session Split -> No" seems to not change anything on my setup.

last edited 09/18/26 by alex

Suggested topics

Topic Participants Replies Views Activity
Support · by Rick Beebe, 5 days ago
2 94 2 days ago
Support · by blu3prince, 2 days ago
0 45 2 days ago
Support · by Marcel, 1 week ago
1 139 3 days ago
Support · by complanar, 5 days ago
4 124 3 days ago
Support · by JakobDB, 2 weeks ago
1 127 2 weeks ago