getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

Exception thrown on switching language #272

Open Karmalakas opened 3 years ago

Karmalakas commented 3 years ago

I have maintenance plugin enabled on my live site, and everything works just fine with all the updates, but...

On local I had maintenance enabled and was logged in. Disabled maintenance plugin (still logged in) and upgraded Grav from 1.7.3 to 1.7.5. Also updated all plugins that needed an update. Login was one of them - updated to 3.4.0 and now I have two critical issues.

  1. When I re-enable maintenance and try to logout, I get:

    Forbidden You don't have permission to access /task:login.logout/logout-nonce:680674371c5603e4c40ba858d0a8be35 on this server.

  2. When I try to switch language (that's how I noticed the issue), I get this no matter if maintenance is enabled or not: Screenshot 2021-02-03 103122

I tried deleting all /cache folder contents, but didn't help. Now I'm afraid to turn off maintenance on live site and can't really work on local :(

Would really appreciate any suggestion ASAP Thank you

Karmalakas commented 3 years ago

I have 2 languages lt (default not visible in URL) and en

When on maintenance page I log in from lt, then I can't switch to en due to exception and can't logout, because of Forbidden error

If I go to /en and login, I get redirected to /en/en, which gives me 404. Then, if I change URL to /en, page loads. Switching language back to lt, switches without a problem, but then I can't go back to en - I get same exception again

Karmalakas commented 3 years ago

For some reason langSwitcher gives me /en/ instead of /en and Grav won't redirect by removing trailing slash. If I go directly to /en, then it works as expected. Still can't logout though. Same on both 3.3.8 and 3.4.0