Skip to content
Grav 2.0 is officially stable. Read the announcement →
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 6 months ago · 4 replies · 216 views
6 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

6 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.

6 months ago

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

6 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.

6 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 ian russell, 4 days ago
2 113 3 days ago
General · by pamtbaau, 1 month ago
2 376 1 week ago
General · by Hanns Mattes, 1 month ago
2 357 2 weeks ago
General · by Andy Miller, 1 month ago
0 260 1 month ago
General · by Jerry Hunt, 1 month ago
2 401 1 month ago