Symfony ObjectHelper woes

12 02 2009

Another dreaded case of Symfony’s white-screen of death struck on a customized Admin Generator -created page for editing. I got no on-screen or logged PHP errors. I tried doing some manual echo statements to track where the problem lay, but it just got me down the wrong path. Of course, the problem only occurred on my production server, but my almost identical development server showed the pages just fine.

Finally, I had a look at the Symfony logs, and noticed where the execution stopped short – right after a partial field that I was using to provide a drop-down category select. I was using the object_select_tag function, and removing that line fixed the problem. Thankfully, that function is an elegant wrapper for the select_tag/objects_for_select functions (the latter being a wrapper for the options_for_select function), and replacing the object function with its functional equivalent made things work fine.

Debugging is tiring!
Read the rest of this entry »

Advertisements