Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Private area not working

Started by alex 4 weeks ago · 2 replies · 302 views
4 weeks 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.

4 weeks 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.

4 weeks 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 webmasterodp, 6 days ago
4 145 6 days ago
Support · by nwhitfield, 1 week ago
2 124 1 week ago
Support · by stell, 2 weeks ago
5 364 2 weeks ago
Support · by gravinator, 1 month ago
5 555 2 weeks ago
Support · by Gravver, 3 weeks ago
6 344 3 weeks ago