You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.
hi canni :
i use the gii generate the views , but in admin view , there come out some exception :
Fatal error: Call to a member function getDbCriteria() on a non-object in C:\xampp\htdocs\my\livmx\protected\extensions\YiiMongoDbSuite\EMongoDocumentDataProvider.php on line 73
you can check the EMongoDocument and admin view , i don't know the reason but this two place seems to be mess:
/**
* Magic search method, provides basic search functionality.
*
* Returns EMongoDocument object ($this) with criteria set to
* rexexp: /$attributeValue/i
* used for Data provider search functionality
* @param boolean $caseSensitive whathever do a case-sensitive search, default to false
* @return EMongoDocument
* @SInCE v1.2.2
*/
public function search($caseSensitive = false)
{
$criteria = $this->getDbCriteria();
you comment : Returns EMongoDocument object ($this) with criteria set to
but the end of the method witch return an instance of EMongoDocmentDataProvider;
in the admin view :
widget('zii.widgets.grid.CGridView', array(
'id'=>'product-type-attr-grid',
'dataProvider'=>new EMongoDocumentDataProvider($model->search(), array(
'sort'=>array(
'attributes'=>array(
'productTypeName',
'inputType',
'dataType',
'modelAttribute',
'label',
'value',
/*
'items',
'htmlOptions',
'_id',
*/
),
),
)),
so you see :)
The text was updated successfully, but these errors were encountered:
The problem is with ADMIN view (I am guessing you used Gii generator for CRUD)
'dataProvider'=>new blah blah
Should be
'dataProvider'=>$model->search(),
hi canni :
i use the gii generate the views , but in admin view , there come out some exception :
Fatal error: Call to a member function getDbCriteria() on a non-object in C:\xampp\htdocs\my\livmx\protected\extensions\YiiMongoDbSuite\EMongoDocumentDataProvider.php on line 73
you can check the EMongoDocument and admin view , i don't know the reason but this two place seems to be mess:
/**
* Magic search method, provides basic search functionality.
*
* Returns EMongoDocument object ($this) with criteria set to
* rexexp: /$attributeValue/i
* used for Data provider search functionality
* @param boolean $caseSensitive whathever do a case-sensitive search, default to false
* @return EMongoDocument
* @SInCE v1.2.2
*/
public function search($caseSensitive = false)
{
$criteria = $this->getDbCriteria();
you comment : Returns EMongoDocument object ($this) with criteria set to
but the end of the method witch return an instance of EMongoDocmentDataProvider;
in the admin view :
widget('zii.widgets.grid.CGridView', array( 'id'=>'product-type-attr-grid', 'dataProvider'=>new EMongoDocumentDataProvider($model->search(), array( 'sort'=>array( 'attributes'=>array( 'productTypeName', 'inputType', 'dataType', 'modelAttribute', 'label', 'value', /* 'items', 'htmlOptions', '_id', */ ), ), )), so you see :)The text was updated successfully, but these errors were encountered: