getgrav / grav-plugin-maintenance

Grav Maintenance Plugin
https://getgrav.org
MIT License
16 stars 17 forks source link

Maintenance plugin with multiple languages #20

Open juanfcocontreras opened 7 years ago

juanfcocontreras commented 7 years ago

My website is multilanguage and my home url is like:

http://server/app

If I try to login in that url everything works as expected.

Nevertheless, if I stay at the site without doing anything, I'm logged out and I have to login again. In that case the url is changed to the following ones according to the language I selected in the web:

http://server/app/en http://server/app/es

In those urls, no matter I input right credentials, I'm always prompt to login again.

It seems to be solved by changing in file login-form.html.twig the line:

<form method="post" action="{{ base_url_relative ~ uri.path }}">

by:

<form method="post" action="{{ page.url }}">

I don't know if this is the best way.

NicoHood commented 3 years ago

To me this fix sounds correct, @rhukster what do you think?