Altering the name of the admin page doesn't automatically update PageAdd link URLs
Short description of the issue
If you have a reason to change the admin page name to alter the login address (in response to a security event, for example) you may find that the PageAdd link urls in the dropdown do not update, but retain the old admin page name in their URL.
Expected behavior
You'd probably expect the links to update dynamically when the admin page name is changed, but...
Actual behavior
The Add links are saved as part of the PageAdd module configuration. They do not automatically update. Clearing caches and compiled files, etc. will not reset them.
Optional: Suggestion for a possible fix
Visiting the PageAdd module settings and resubmitting the settings will force the links to incorporate the new admin page name.
It might make sense someplace in the core to hook into the 'admin' page save process and automatically refresh the PageAdd module configuration if it is installed/used.
Setup/Environment
You simply need to be using the PageAdd module and have page types that are configured to appear in the dropdown.
- ProcessWire version: 3.X
@solonmedia I looked in the ProcessPageAdd module configuration, but the settings for "template shortcut sort order" (used for "Add New") is stored as page IDs. The "Add New" dropdowns are however cached in the session. So if you change the admin page name, you'd have to logout and log back in. Or let me know if I've misunderstood?
So when I changed the name of the admin page, I did have to log out and log back in. I didn't check the Add New link in the pages menu. I only noted that in the add new button in the top right the urls reflected the old admin page name and would not resolve.
I tried clearing all sorts of caches and compiled files - the only thing that reset those URLs for me was going into the module config and resubmitting. Once I did that, all of the add page links resolved properly.
I'm using db sessions if it makes a difference.
@solonmedia Thanks for testing. Logging out and logging back in should correct those navigation links. If it's not, then maybe there's something else going on. Are you able to try on a different site? Or, let's see if we can get someone else to reproduce.
@solonmedia, if I understand correctly, just logging out and back in didn't resolve the issue? You still had to go to PageAdd module settings and submit?
@solonmedia I'll close this; please reopen it if needed.