CakePHP error messages are not shown, and what you can do against it

If you use the JavaScript helper (or any other helper except the html helper) in your default layout you may have noticed that error messages like “missing database table” are not shown. Olle presents in his answer to ticket 334 a simple but effective solution:

if (isset($javascript))
{
    echo $javascript->link("your_javascript"):
}

One Comment

  1. Nate
    Posted January 31, 2006 at 4:25 am | Permalink

    You can also come at the problem from the other end. What I’ve started to do in some of my apps is include all my helpers for the entire application in AppController, since the overhead for loading them isn’t that much anyway.

    Error pages always render, and I have that much less to code in each of my controllers.


%d bloggers like this: