Click Fraud Protection
PHP related blog, freelancer to hire!

Symfony admin generator problem

When you change your schema.yml file, especially removing column which you used before for sorting you can have face problem with 500 internal server error. Why?

If you look closer into cache directory with auto-generated files
you can see:

protected function addSortCriteria($c)
if ($sort_column = $this->getUser()->getAttribute('sort', null, 'sf_admin/tag_elements/sort'))
$sort_column = TagElementsPeer::translateFieldName($sort_column, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_COLNAME);

So the sort element comes from SESSION! Even when you clear cache (symfony cc), session stays same.

Whenever you do changes, clear browser cache!

Affects Symfony 1.0.17

Leave a Reply