Open brendanheywood opened 7 years ago
Regardign first checkbox: I believe no pages be rendered after a post, it should have a redirect which MDL-53357 should fix.
I believe no pages be rendered after a post, it should have a redirect which MDL-53357 should fix.
This assumption isn't correct and we cannot assume this at all. Heaps of pages serve a valid page after post.
Not sure if there is an actual problem, and it might just be some overlap with this issue:
https://github.com/brendanheywood/moodle-local_cleanurls/issues/88
Many moodle pages post to a url which doesn't have say a ?id=123 but is effectively still the same url. In these cases the router.php doesn't see it because it only looks are get, so it isn't really uncleaned, but then it then does a JS http push state clean after the page has loaded. This second cleaning isn't perfect.
So needs some thought, but I suspect it boils down to:
[ ] (outside the cleaner) for pages which we want to POST to and remain clean I think the correct solution is to make sure it posts to a GET'able url so would still work even without the cleaner (eg an example is this tracker https://tracker.moodle.org/browse/MDL-53357).
[ ] inside the cleaner / router.php we ignore pages which have been POST'ed to, or perhaps do this only in pages known to work. Perhaps the callbacks need to be given the HTTP method to help them determine whether it can be cleaned or uncleaned.