well, i was in a hurry.. im sorry this happens only if the browser has some invalid cookie/browserinfo setting
check it out with anonymouse.org its a service to hide your identity - but it also destroys the cookie information and cake suddenly behaves weird. anyway - even if its a bug it was just an example but of course most of the things could and should stay inside beforeFilter() or beforeRender() etc On 4 Feb., 19:16, Miles J <[email protected]> wrote: > Then that should be filed as a bug, not hacked to work correctly. > > I have yet to see any translation problems on error pages, ill test it > out. > > On Feb 4, 10:13 am, euromark <[email protected]> wrote: > > > thats not quite correct > > if its anything that is needed even on error pages and beforeRender() > > is called too late > > you'd need to override the constructor > > > e.g: > > # bug fix for i18n > > if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { > > Configure::write('Config.language', 'de-de'); > > } > > > etc > > > otherwise the error messages in this particular case would not be > > translated > > > by the way: > > i always hated the fact that beforeFilter() ist not invoked on > > errors... > > > On 4 Feb., 19:06, Miles J <[email protected]> wrote: > > > > He shouldn't need to create his own __construct() no matter what. Any > > > custom code can be placed in beforeFilter(), since its called right > > > after construct anyways. > > > > On Feb 4, 2:12 am, euromark <[email protected]> wrote: > > > > > you have to distinguish between php5 code itself and framework related > > > > callbacks > > > > they have nothing to do with each other > > > > > if you need to override any of the above you should always call the > > > > parent > > > > > parent::__construct() > > > > > and > > > > > parent::beforeFilter(); > > > > > etc > > > > > On 4 Feb., 08:46, Miles J <[email protected]> wrote: > > > > > > beforeFilter() isn't a constructor. Its just a normal method, which is > > > > > used as a callback. > > > > > > You should never overwrite the constructor as it has important code. > > > > > That's what the callbacks are for, to define custom code to not > > > > > conflict. > > > > > > Also, this has nothing really to do with PHP 4 or 5, its a > > > > > architecture setup. > > > > > > On Feb 3, 11:37 pm, Okto Silaban <[email protected]> wrote: > > > > > > > Can I refere to a complete documentation how can I work with strict > > > > > > PHP5 on CakePHP? > > > > > > > For example : Can I remove beforeFilter() and use __construct() > > > > > > instead ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
