-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timetable Admin: refactor to use Url class for paths and url generation #1674
base: v25.0.00
Are you sure you want to change the base?
Conversation
* Use __DIR__ and require_once for a more stable behaviour when routed through index.php.
* Replace all absoluteURL usages and relative URL paths with Url implementation.
* Besides accepting a 'q' parameter, it now also accepts a Url instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Koala, you've done a lot of great work here, I think unfortunatly any of the forms using Url::fromModuleRoute will face the same problem highlighted in the Crowd Assessment PR: the links are prepending the index.php/ front-controller route rather than a direct link to the script. Curious to hear what your thoughts are in terms of handling those two different types of routes in the URL class: a new method, or a chained method modifier?
I think in long term, all the corner cases of the problem scripts need to be refactor so they works within index.php routing environment. Only then we can really migrate to path based routing (instead of script file based). It is strange that the form submit target cannot be routed from index.php. I'm going to use the Crowd Assessment module as a test bed to try things out first. It is one of the smallest modules in Gibbon. Things should be simpler with it than the bigger ones. And before that, I'll need a better test coverage to the module. |
Description
__DIR__
and require_once for a more stable behaviour when routed through index.php.Motivation and Context
$session->get('absoluteURL')
from the module.How Has This Been Tested?