Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Various Views within a Controller Mysteriously Throwing 404's
  • What would make certain views within a controller 404 and the others be OK?

    For example, I have a controller with views: a, b, c, d

    All methods action_a, action_b, etc have the exact same code within them (default from oil)

    When I go to a and b, page loads fine, but c and d throws back 404.

    What could be the issue?  I'm stumped...

    Thanks in advance!
  • Nevermind, I just realized that in 2 of them I passed in a non-optional param which if not present in the URL, causes the 404.  Sorry just starting playing around with this a few days ago.

    Just for clearification...  In controller 4 methods:

    action_a()

    action_b()

    action_c($param)

    action_d($param)

    So going to both:

    host/controller/a
    host/controler/b

    Worked as expected...

    However going to both:

    host/controller/c
    host/controller/d

    404'd...

    When I added the param to the url everything loaded fine, such as:

    host/controller/c/1

    Thanks really loving fuel so far. Nice work fellas!
  • Alternatively you can make the parameter optional: action_d($param = null) and then it would work too.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion