Remove unreachable refresh_site controller#16947
Conversation
smg6511
left a comment
There was a problem hiding this comment.
Confirmed all works as expected. No found references to controller.
|
Shouldn’t there be an upgrade script that removes these files as well? |
Maybe? IDK. I'm torn since I generally use with git and removing files in a script feels redundant. |
If they were part of a release, we used to remove them during setup. |
I recall — though that was specifically cleaning up old 2.x paths abandoned in 3.x. 🤔 |
|
But, there's nothing that would remove them in an typical upgrade situation otherwise, right? |
There's not, but we've never established a standard for this other than the one cleanup script for 3.0.0 release that I can find. |
|
Further, it looks like the way it was handled in that script would not work if you used the advanced installer to put the manager in a different location (or manually moved it to a different location). |
|
I wasn’t totally sure what we used to do with left over files in the past, it has been a while for me! |
What does it do?
Removes the unused
system/refresh_sitemanager controller path:manager/controllers/default/system/refresh_site.phpmanager/templates/default/system/refresh_site.tplLexicon entries
refresh_site/refresh_site_desc(incore/lexicon/en/topmenu.inc.php) are retained — they're used as the Clear Cache topmenu item's label and description, not as path references.Why is it needed?
The controller is dead code, unreachable in-tree:
_build/data/transport.core.menus.phpuses'action' => ''with'handler' => 'MODx.clearCache(); return false;'— it routes to theSystem/ClearCacheconnector processor, not to this controller.include/requirereferences the file, no JS or URL constructions reference?a=system/refresh_site, and no other code references the would-beSystemRefreshSiteManagerControllerclass./manager/?a=system/refresh_site, which has been broken since themodManagerControllerloader started requiring.class.phpfiles.PR #16827 proposed converting the script-style file into a controller class to fix the broken URL. Triage determined the maintenance surface isn't worth preserving an entrypoint with no callers and no menu route. Closing #16827 in favor of retirement.
How to test
OnBeforeCacheUpdate/OnSiteRefreshstill fire from the connector processor path)./manager/?a=system/refresh_sitedirectly — confirm the response is a clean "unknown action" frommodManagerResponserather than a fatal.Related issue(s)/PR(s)
Resolves #16282 (by retirement rather than fix). Supersedes #16827.