Saturday, November 7, 2009

Sympal installation fix

Recently I was trying to install the Sympal plugin for Symfony. Everything was fine until I tried to run the application. Symfony has displayed an 404 error unfortunately telling me nothing useful:

Unable to find the 
Component : Content
Table : content
object with the following parameters "array ()").

I've cleaned the project up and step by step installed the plugin again. And... I saw the same error. So I thought "wtf?" and started googling for help. I thought: it's quite popular plugin, I should find tons of posts and manuals about it. I was wrong, I found only few posts about my problem and no solution. I didn't give up and in the end on some mailing list someone found the reason and was kind enough to share it.

It looks like there's a bug in fixtures: in content and menu_item tables all records have the date_published column set to NULL while the is_published flag is set to TRUE. So to fix the error set date_published=NOW() and run the app. Now everything should work as expected.