Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

When a page with the folder name "login" exists, access: site.login does not work anymore

first-time

Solved by pamtbaau View solution

Started by Lorenz 5 months ago · 4 replies · 52 views
5 months ago

Hi there,

when I create a page called login, the pages containing

TXT
access:
TXT
site.login: true

are not found anymore.

When I rename that login-Page, evertythings seems to work fine again.

I know, for my case, it’s not strictly required to name the page exactly that way and I have some workarounds, but I needed two days to figure that obscure bug out.

Greetins from Germany,

Lorenz

5 months ago Solution

@loie, Your question does not provide specific information, so my answer might be incorrect...

The Login plugin provides its own login.md page which has a default route of /login. If you override that route with your own page called /login, I guess the Login plugin will no longer function correctly.

5 months ago

I have created a page 02.login/modular.md and that broke the entire login system.

5 months ago

@loie, Well, doesn't that confirm my suspicion... You have overridden the default /login route with your own page. When the Login plugin calls your page, it doesn't know how to handle it.

There is no need to create a "login" page, since the plugin already provides one.

5 months ago

On admin, if you go to /admin/plugins/loginand on the "Routes" tab change the "Login route" from /login to something else, I believe it should work. Don't know what to change directly on YAML config

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 3 days ago
2 70 5 hours ago
General · by pamtbaau, 10 hours ago
1 45 10 hours ago
General · by Andy Miller, 22 hours ago
0 43 22 hours ago
General · by Marcel, 12 months ago
6 341 4 days ago
General · by Duc , 5 days ago
3 35 5 days ago