getgrav / getgrav/grav-plugin-admin

Not including a leading slash in Administrator Path causes navigation issues

Open
#2,336 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

Version: Admin Panel v1.10.38

If a user leaves out a leading slash in the Administrator Path setting, this can allow the navigation to start to act up as the link generation seems to assume that it should use a relative directory path based on the current URL

Example:

If a user goes to modify the admin panel plugin's settings from the web ui:
User clicks on Plugins and gets the list of plugins, the url is [sitename]/[adminpath]/plugins
User clicks on Admin Panel plugin in the list, url becomes [sitename]/[adminpath]/[adminpath]/plugins/admin
![image](https://user-images.githubusercontent.com/627845/215389194-60656ea8-8786-4f5b-b358-d83c9aa93fab.png)

If user then clicks on Plugins in the side nav again to try to return to the list, url becomes [sitename]/[adminpath]/[adminpath]/plugins/[adminpath]/plugins
![image](https://user-images.githubusercontent.com/627845/215389223-5c9301f6-6f45-46e5-865e-a1c8bfa49dfe.png)

Recommendations:
- Modify url generation to base path based on grav root instead of current url
OR
- Modify admin panel to have sanity check to prompt user to have leading forward slash in box

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.