gt;
>
>
>
> > maybe try to set viewClass = 'Theme';
> > --
> > Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> > 2012/3/7 pablosky
>
> > > Hello,
>
> > > Version 2.0.5
>
> > > To change the layout of the errors is easy:
>
&g
erle.eu
>
> 2012/3/7 pablosky
>
>
>
>
>
>
>
> > Hello,
>
> > Version 2.0.5
>
> > To change the layout of the errors is easy:
>
> > // In beforeFilter
> > if ($this->name === 'CakeError') {
> > $this->layout = 'de
maybe try to set viewClass = 'Theme';
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/3/7 pablosky
> Hello,
>
> Version 2.0.5
>
> To change the layout of the errors is easy:
>
> // In beforeFilter
> if ($this->name === 'CakeError') {
>
Hello,
Version 2.0.5
To change the layout of the errors is easy:
// In beforeFilter
if ($this->name === 'CakeError') {
$this->layout = 'default';
}
But how I can do to use a layout of a theme?
I tried this but it works:
// In beforeFilter
if ($this->name === &
ok no problem :D :D
--
LP,
Tilen Majerle http://majerle.eu
2010/8/27 Joshua Muheim
> Thanks a lot for your very helpful answer. :-)
>
> On Fri, Aug 27, 2010 at 3:18 PM, Tilen Majerle
> wrote:
> >
> > second parameter should be array...so:
> > $this->cak
Thanks a lot for your very helpful answer. :-)
On Fri, Aug 27, 2010 at 3:18 PM, Tilen Majerle wrote:
>
> second parameter should be array...so:
> $this->cakeError("error401", array("message" => "activate a Termolino
> word")); //message is varia
second parameter should be array...so:
$this->cakeError("error401", array("message" => "activate a Termolino
word")); //message is variable name
second parameter is list of variables to be set for set() function for
variables in view :D
--
LP,
Tilen Majerle
Wow, much better now! But I still having problems to get the message (2nd
parameter) from
$this->cakeError("error401", "activate a Termolino word");
into my view. Any idea? Thanks!
On Fri, Aug 27, 2010 at 2:54 PM, Tilen Majerle wrote:
> this u will need...
>
ror extends ErrorHandler {
>>function error401() {
>>
>>}
>> }
>>
>> ?>
>>
>> And I created a view app/views/errors/error401.ctp with the following
>> content:
>>
>>
>>
>>:
>>&g
a view app/views/errors/error401.ctp with the following
> content:
>
>
>
> :
> "'{$message}'")?>
>
>
> Then I call the error using:
>
> $this->cakeError("error401");
>
> But I'm still getting the default 401 error... (or at least not
Hi all
I want to display a 401 error, so I created an app/app_error.php file
with the following content:
And I created a view app/views/errors/error401.ctp with the following
content:
:
'{$message}'")?>
Then I call the error using:
$this->cakeError(
hi
I tried copying cake/libs/error.php to my app/controllers and then
adding $helpers = array('Javascript') but it didn't work, although
adding it (temporarily. natch!) to the lib file does work.
What is the thing with the inheritance that I am missing here?
cheers
Luke
Check out the new CakeP
I figured out how to do this, by creating app_error and overriding
_outputMessage.
toby1kenobi wrote:
> Hi there,
>
> Is it possible to specify an alternative layout for use when calling
> cakeError?
>
> Thanks,
>
> Toby
--~--~-~--~~~-
Hi there,
Is it possible to specify an alternative layout for use when calling
cakeError?
Thanks,
Toby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send ema
e?
>
> > > > That being asked, you might take a look here on how to handle this
> > > > situation:http://teknoid.wordpress.com/2008/08/29/dealing-with-errors-in-cakephp/
>
> > > > On Feb 6, 11:54 am, maxmil wrote:
>
> > > > > I have
; On Feb 7, 10:42 am, ianh wrote:
>
> > @Teknoid; subsequent to my earlier posting I did find your blog post
> > and changed from writing Configure::write('debug', 1) at the point of
> > calling cakeError to setting debug to 1 in the __construct() method of
> &g
Configure::write('debug', 1) at the point of
> calling cakeError to setting debug to 1 in the __construct() method of
> app_error so many thanks for pointing out that this could be done.
>
> You asked what errors do you want to display; well the first main
> thing to note is
@Teknoid; subsequent to my earlier posting I did find your blog post
and changed from writing Configure::write('debug', 1) at the point of
calling cakeError to setting debug to 1 in the __construct() method of
app_error so many thanks for pointing out that this could be done.
You
'/errors/custom_error');
>
> instead invoking $this->cakeError.
>
> On Jan 16, 11:55 am, ianh wrote:
>
> > Hmm. Just found the same thing. Seems to be to do with lines 110 to
> > 117 in core error.php __construct method
> > if ($method !== 'erro
om_error');
instead invoking $this->cakeError.
On Jan 16, 11:55 am, ianh wrote:
> Hmm. Just found the same thing. Seems to be to do with lines 110 to
> 117 in core error.php __construct method
> if ($method !== 'error') {
> if (Configure::read() == 0) {
$method = 'error500';
}
}
}
So if you trigger cakeError with a method like 'test' then that works
fine unless Configure::read() (which seems to return debug by default)
is 0 then it gets reset. So you can create a custom metho
5, 2009 at 10:17 AM, Aidan Lister wrote:
>
> >> I've spent some time creating meaningful error pages for my users (a
> >> selection of my users have access to advanced tools like pdf
> >> generation). Each error page was a custom error handler, called by
> >>
gt;> selection of my users have access to advanced tools like pdf
>> generation). Each error page was a custom error handler, called by
>> $this->cakeError('foo'); as defined in /app/app_error.php
>>
>> I was quite shocked to discover that once debug = 0 was s
creating meaningful error pages for my users (a
> selection of my users have access to advanced tools like pdf
> generation). Each error page was a custom error handler, called by
> $this->cakeError('foo'); as defined in /app/app_error.php
>
> I was quite shocked to discover
I've spent some time creating meaningful error pages for my users (a
selection of my users have access to advanced tools like pdf
generation). Each error page was a custom error handler, called by
$this->cakeError('foo'); as defined in /app/app_error.php
I was quite shocked to
> I'd like to handle major (and plugin-specific) errors that may happen
> with thecakeErrormethod, but we can't define a MyPluginAppError? Is
> there another way?
You can achieve this in the following way:
1. In your {Plugin}AppController override the cakeError() method with
Hi all,
I'm a newcomer to CakePHP, trying to write a plugin (with Cake
1.2.0.7692 RC3)
I'd like to handle major (and plugin-specific) errors that may happen
with the cakeError method, but we can't define a MyPluginAppError? Is
there another way?
This idea has already been su
Hi,
I managed to override the default layout and individual templates
locally but cannot get it
working live:
I did this by setting the layout at the top of my custom template
files...
I have overridden my error handler to mail some messages before
calling parent methods, but I guess I am
Hi,
I managed to override the default layout locally but cannot get it
working live:
I did this by setting the layout at the top of my custom template
files...
Seems a bit bollox to have to override a whole error handler just to
use custom layouts and templates, maybe this will get fixed
Hi,
On Jul 19, 10:16 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Sorry guys did not know "errors always use the default layouts".
>
> On Jul 18, 12:00 am, phpjoy <[EMAIL PROTECTED]> wrote:
>
> > that's great to know, "errors always use the default layouts". :)
> > didn't see it in the manual..
Sorry guys did not know "errors always use the default layouts".
On Jul 18, 12:00 am, phpjoy <[EMAIL PROTECTED]> wrote:
> that's great to know, "errors always use the default layouts". :)
> didn't see it in the manual..
>
> thanks a tons for the solution.
>
> On Jul 16, 7:52 pm, rtconner <[EMAIL
that's great to know, "errors always use the default layouts". :)
didn't see it in the manual..
thanks a tons for the solution.
On Jul 16, 7:52 pm, rtconner <[EMAIL PROTECTED]> wrote:
> Ah.. phpjoy, I had the same problem. There is no easy solution so far
> as I could find. No good solution tha
Ah.. phpjoy, I had the same problem. There is no easy solution so far
as I could find. No good solution that I liked anyways. Errors always
use the default layout, and there is nothing you can do to change
that.
.. So.. the best solution as I could figure is this..
Create /app/error.php and copy
ut.
> > so i added default.ctp to my layouts directory, and it loaded it.
>
> > however i want a custom layout for my errors [from default.ctp], and i
> > wonder how to do that.
> > this is the code:
>
> > //$this->layout='wetsummer10/default';
>
10/default';
> //$this->layout='default/default';
> $this->layout='spark';
> $this->cakeError('error', array(array('name' => 'Page Was Not Found',
> 'code'=>'404', 'message'=>'Error Mes
rs [from default.ctp], and i
wonder how to do that.
this is the code:
//$this->layout='wetsummer10/default';
//$this->layout='default/default';
$this->layout='spark';
$this->cakeError('error', array(array('name' => 'Page Was Not Fou
rge($allow, array('\\', ':') );
}
$clean = new Sanitize();
$messages = $clean->paranoid($messages, $allow);
that means no international chars can be put inside a message..
On Jun 29, 10:56 am, phpjoy <[EMAIL PROTECTED]> wrote:
&
hey,
if i try to use cakeError with an international char, it simply
ignores the information.
for example:
$this->cakeError('error', array(array('name' => 'PageNotFound',
'code'=>'404', 'message'=>'displayedmessage
http://groups.google.com/group/cake-php/search?group=cake-php&q=%22%24this-%3Elayout%22&qt_g=1&searchnow=Search+this+group
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, sen
yes ok but when i replace the missing_controller page i see the default
layout that is localized in the layouts directory. How i can change
this layout?!?!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP"
The Cake error pages are great, because they always tell you exactly
what you need to do, not only to fix them, but to replace them with
custom pages. The first line of every error page, right below the
title, says something like this:
Notice: this error is being rendered by the
app/views/errors
Hi
i want change the template of the error page when i invoke cakeerror...
how can i do?
There are an infos abount cakeerror and can i manager that?
Tnx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
42 matches
Mail list logo