Comments (7)
@brendanheywood what was the intention on this issue? I just saw it in the code and realised that the redirect won't work as $PAGE doesn't have any URL when after_config gets called.
from moodle-tool_redirects.
It actually caused #4 and we fixed it as https://github.com/catalyst/moodle-tool_redirects/blob/master/classes/helper.php#L104
But this hook would never work anyway.
from moodle-tool_redirects.
Yeah you are right, but this hook could still work just by using the real url and not the $PAGE object
from moodle-tool_redirects.
I'm trying to figure out what was the reason for this hook? Any issues using before_http_headers?
from moodle-tool_redirects.
I think before_http_headers is only called from a rendered page so there is a lot of edge cases it doesn't touch and after_config would get all of them. It was probably to avoid some situations with a double or triple redirect and make it faster
from moodle-tool_redirects.
Can you think of any not rendered page/URL that we would like to redirect from?
from moodle-tool_redirects.
The one which jumps to mind is code which does some logic and then redirects somewhere else, eg sso, and we'd want this to trigger first. I really dunno and can't remember why I wanted this. I'm fine to revert it until we find and document a proper use case
from moodle-tool_redirects.
Related Issues (13)
- Move redirect rules from config settings to dedicated table HOT 1
- Redirect from sources that are not Moodle URLs HOT 6
- Validate the regexes when saving the admin config
- Allow comments anywhere in the textarea
- Consider ditching the # or / delimiter in the regex
- Have a debug mode for testing the regexes HOT 1
- Allow regex capture groups so you can use them in the redirect url HOT 1
- PHP Notice during 3.7 -> 3.9 upgrade HOT 1
- No redirects happening HOT 2
- Migrate CI to reusable workflows HOT 1
- Add new capability to to let non-admin users (eg editing teachers, content managers etc) use noredirect param HOT 1
- Cant make my rules to work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-tool_redirects.