CakePHP : clear app/tmp/model when you set DEBUG 0

Note: This post is over a year old and the content may no longer be accurate.

I’m about to hand over a CakePHP based CRM system to the clients. Happy that everything was working as it should, I set DEBUG to 0. I immediately noticed that almost all the data had disapeared from the edit views and the detail views (although not the index views curriously eneough).

It took me quite a while to find the solution. It turns out that you have to delete all the files in the /app/tmp/model/ directory.

See CakePHP group Setting debug = 0 kills my app?