I’ve got a strange problem on 1.1.1.
As part of my application I have an Addresses model, each address is associated with a town.
I’m generating a drop-down list of towns upon creating and updating an address with the following code in my _form.php:
echo $form->dropDownList($model,'town_id', CHtml::listData(Towns::model()->TownList, 'id', 'name', 'state'));
TownList is a function in my Towns model as follows:
public function getTownList()
{
$criteria=new CDBCriteria;
$criteria->select="id, concat(name, ', ', state, ' ', postcode) as name, state";
$criteria->order='state,name';
return Towns::model()->findAll($criteria) ;
}
Now when updating an existing address, everything works as expected - but when trying to create a new address I get the following PHP error:
include(CDBCriteria.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
The create & update actions in my addresses controller are unmodified from the crud generated by yiic and i’m sure i’ve done this before with previous versions.
Is this a bug? Am I using this in the wrong way or is there something else i’m missing?