getgrav / getgrav/grav-plugin-admin
Login partial template override
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
I'm annoyed by a particular line in the login template
The one which forcefully added the query-string to the admin redirection in ecf9f5046f600b772f9319c7a8cbdfd387149e0b
The reason is that, for caching purpose, I'm internally adding a parameter to my requests, like `?_foo=url-encoded-request-uri` in order to avoid serving (cached) `/` for requests to `/admin` (since both are rewritten to `/index.php`)
I need this parameter to be transparent to Grav (and not be part of any `uri.query`) but since I didn't find a way to do that inside Grav's router, I find easier to override that template. Would you mind indicating where could I put my override (in my own theme directory) in order to do so?
(I've to do so, because Grav otherwise throws an `INVALID_SECURITY_TOKEN` error which, in itself, sounds like a bug. Would be nice to avoid this error when `redirect` is slightly changed)
Contributor guide
Research direction
Start by locating the login partial and the admin redirection changed in commit ecf9f5046f600b772f9319c7a8cbdfd387149e0b. Determine whether the plugin documents a theme override location; done means identifying how to override that template or confirming the redirect and INVALID_SECURITY_TOKEN behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100