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!
The technical info:
Symfony 1.0.17 (and post upgrade to 1.0.19)
PHP 5.2.6 FreeBSD (my dev server which worked is 5.2.5 Windows , though I’m not sure this would make a difference)
The options are being taken from a “virtual” DB class, as I created a special class for these categories which inherits from a more general class equipped with fields for id & name, which was mostly all I needed for these categories.
The category value is not located in the object’s table, but was created using my own Behavior class, which works quite well otherwise.
Either of these 2 complications might have caused the problem, but I’m happy enough with the work-around to leave it alone.