Closed diegomagikal closed 5 months ago
Hello @diegomagikal,
Thanks for Your report.
As I noticed in grav-plugin-admin there is a place where admin route is defined (depends on config):
https://github.com/getgrav/grav-plugin-admin/blob/develop/themes/grav/templates/partials/javascript-config.html.twig#L15
So I used window.GravAdmin.config
to fix this problem.
Fixed in new release. Related commit: https://github.com/greenrivers/grav-plugin-webp/commit/3e330d18edd4044798fe03997a0cce5e8a3abe20
I would welcome Your feedback. :-)
It worked, thanks :-)
Hi,
The plugin admin buttons don't work with custom admin routes or custom server paths, getting a 404 error.
I took a look at
progressbar.js
and I noticed the admin path is static, like:I usually change the admin route value on all my websites for security reasons (ex: /admin123), and my server URL is something like
https://localhost/sites/foobar
, so my final admin URL ishttps://localhost/sites/foobar/admin123
, and nothttps://localhost/admin
as your script suggests.I think you could implement something like
<script> var adminroute = {{ base_url|e ~ config.plugins.admin.route }};</script>
in your twig files to pass the correct URL to JavaScript.