On Sep 15, 6:34 am, Casey casey.cam...@gmail.com wrote:
I haven't tried this, but since it is a forward, can you set a request
attribute that can be accessed by the 404 action?
That's pretty much what I was getting at! The problem is still that
you'd have to set it before calling one of the
I think a flash message for the user object would do the job
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe
To automate the process you could make a myactions.class.php file in
the lib dir that extends sfActions then change all of the actions
under your modules folder to inherit from myactions. Then create a
forward404WithMessage($msg) function that automatically sets the msg
as an attribute, say
On 13 Sep 2009, at 18:12, rooster (Russ) wrote:
In the meantime, unless anyone else can think of something, the only
thing I can suggest is that you override the sf404Exception class to
store the message for you.
I haven't tried this before, but you could try using my
sfRequestPlugin
Well, since the request is forwarded and not redirected it is possible
to set any number of different variables that can be retrieved later,
even something like sfConfig::set(404_message, something); would
be sufficient.
The problem is that you'd have to do that prior to calling 404
function, so
I haven't tried this, but since it is a forward, can you set a request
attribute that can be accessed by the 404 action?
On Sep 14, 5:49 am, rooster (Russ) russmon...@gmail.com wrote:
Well, since the request is forwarded and not redirected it is possible
to set any number of different
On Sep 13, 9:05 am, pcummins patwcumm...@gmail.com wrote:
How do I get the message from a call to $this-forward404() into a
customized error404Success.php template?
Your custom template should have a variable called $exception, which
is the sfError404Exception object... The message is the
Russ, unfortunately the $exception variable doesn't seem to available when I
send a 404 (see code below). The $exception variable IS available when I
throw an unhandled exception from an action. Unfortunately, my entire app
was built to throw errors (for missing parameters and just about
Sorry, my bad - on closer inspection this is not the case for 404
exceptions. Not sure why, this would be a useful feature!
The only place that gets the error message is the php error_log
function, which means in theory you could retrieve the error using
error_get_last(). This is not wise
Thanks Russ!
I looked into converting all 404's errors to unhandled exceptions... but
error.html.php, doesn't get decorated with the layout so I'll take a crack
overriding the sf404Exception.
I'll post my patch when it's done.
On Sun, Sep 13, 2009 at 1:12 PM, rooster (Russ)
10 matches
Mail list logo