Git Product home page Git Product logo

Comments (7)

dmitriim avatar dmitriim commented on June 3, 2024

@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.

dmitriim avatar dmitriim commented on June 3, 2024

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.

brendanheywood avatar brendanheywood commented on June 3, 2024

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.

dmitriim avatar dmitriim commented on June 3, 2024

I'm trying to figure out what was the reason for this hook? Any issues using before_http_headers?

from moodle-tool_redirects.

brendanheywood avatar brendanheywood commented on June 3, 2024

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.

dmitriim avatar dmitriim commented on June 3, 2024

Can you think of any not rendered page/URL that we would like to redirect from?

from moodle-tool_redirects.

brendanheywood avatar brendanheywood commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.