Related to this question I'm getting a error while trying to edit any records create previously. This is the error (I omitted some irrelevant pieces for not extend the post so much):
500 | Internal Server Error | Doctrine_Record_UnknownPropertyException Unknown method Estado::
stack trace at () in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php line 2658 ... }
} throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown method
%s::%s', get_class($this), $method));
} /** at Doctrine_Record->__call('', array()) in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php
line 197 ... at sfDoctrineRecord->__call('', array()) in n/a line n/a ... at Estado->() in n/a line n/a ... at call_user_func(array(object('Estado'), '')) in SF_ROOT_DIR/plugins/sfDependentSelectPlugin/lib/source/sfDependentSelectObjectSource.class.php line 56 ... at sfDependentSelectObjectSource->getRefValue('15') in SF_ROOT_DIR/plugins/sfDependentSelectPlugin/lib/widget/sfWidgetFormDependentSelect.class.php line 98 ... at sfWidgetFormDependentSelect->render('persona[estado_id]', '15', array(), null) in SF_ROOT_DIR/plugins/sfDependentSelectPlugin/lib/widget/sfWidgetFormObjectDependentSelect.class.php line 70 ... at sfWidgetFormObjectDependentSelect->render('persona[estado_id]', '15', array(), null) in SF_ROOT_DIR/plugins/sfDependentSelectPlugin/lib/widget/sfWidgetFormDoctrineDependentSelect.class.php line 67 ... at sfWidgetFormDoctrineDependentSelect->render('persona[estado_id]', '15', array(), null) in SF_ROOT_DIR/lib/vendor/symfony/lib/widget/sfWidgetFormSchema.class.php line 512 ... at sfWidgetFormSchema->renderField('estado_id', '15', array(), null) in SF_ROOT_DIR/lib/vendor/symfony/lib/form/sfFormField.class.php line 119 ... at sfFormField->render() in SF_ROOT_DIR/lib/vendor/symfony/lib/form/sfFormField.class.php line 58
I don't know where to look for this Estado:: or where it fails, any solution to this?
$this->widgetSchema['estado_id'] = new sfWidgetFormDoctrineDependentSelect(array( 'model' => 'Estado', 'add_empty' => 'Seleccione estado', 'ajax' => true )); $this->widgetSchema['municipio_id'] = new sfWidgetFormDoctrineDependentSelect(array( 'model' => 'Municipio', 'depends' => 'Estado', 'add_empty' => 'Seleccione municipio', 'ajax' => true, 'order_by' => array('nombre', 'asc') ));
also it's in the post refered here – ReyniersfWidgetFormDoctrineDependentSelect
? Maybe you could just use the usualsfWidgetFormDoctrineChoice
? – Michal Trojanowskiestado_id
doesn't have to be of classsfWidgetFormDoctrineDependentSelect
as it does depend on anything. Change the class tosfWidgetFormDoctrineChoice
and drop theajax
option and you should be fine. – Michal Trojanowski