Yii Framework Forum: Bootstrap Editiable - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Bootstrap Editiable Error/ Burg when Editing Rate Topic: -----

#1 User is offline   Donatus 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 29-November 11

Posted 13 November 2012 - 01:17 AM

Hi guyz,
The above extension works so well on my local machine, but when I transfer my sources to a server machine running windows, I get the following error.


<h1>CException</h1>
<p>Model EditableSaver not found by primary key "8201210010000167" (C:\xampp\htdocs\majics\protected\extensions\editable\EditableSaver.php:96)</p><pre>#0 C:\xampp\htdocs\majics\protected\controllers\TempMrController.php(55): EditableSaver->update()
#1 C:\xampp\htdocs\yii\framework\web\actions\CInlineAction.php(50): TempMrController->actionUpdateReading()
#2 C:\xampp\htdocs\yii\framework\web\CController.php(309): CInlineAction->runWithParams(Array)
#3 C:\xampp\htdocs\yii\framework\web\filters\CFilterChain.php(134): CController->runAction(Object(CInlineAction))
#4 C:\xampp\htdocs\yii\framework\web\filters\CFilter.php(41): CFilterChain->run()
#5 C:\xampp\htdocs\majics\protected\modules\rights\components\RController.php(36): CFilter->filter(Object(CFilterChain))
#6 C:\xampp\htdocs\yii\framework\web\filters\CInlineFilter.php(59): RController->filterRights(Object(CFilterChain))
#7 C:\xampp\htdocs\yii\framework\web\filters\CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
#8 C:\xampp\htdocs\yii\framework\web\CController.php(292): CFilterChain->run()
#9 C:\xampp\htdocs\yii\framework\web\CController.php(266): CController->runActionWithFilters(Object(CInlineAction), Array)
#10 C:\xampp\htdocs\yii\framework\web\CWebApplication.php(283): CController->run('updateReading')
#11 C:\xampp\htdocs\yii\framework\web\CWebApplication.php(142): CWebApplication->runController('tempMr/updateRe...')
#12 C:\xampp\htdocs\yii\framework\base\CApplication.php(162): CWebApplication->processRequest()
#13 C:\xampp\htdocs\majics\index.php(23): CApplication->run()
#14 {main}</pre>



And I have done update of the framework, cleaned my sources and much. What would be the problem?
Thanks.
0

#2 User is offline   cico 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 22-December 12

Posted 14 June 2013 - 06:22 PM

View PostDonatus, on 13 November 2012 - 01:17 AM, said:

Hi guyz,
The above extension works so well on my local machine, but when I transfer my sources to a server machine running windows, I get the following error.


<h1>CException</h1>
<p>Model EditableSaver not found by primary key "8201210010000167" 
...



And I have done update of the framework, cleaned my sources and much. What would be the problem?
Thanks.


Did you use mongoDBsuite?

if yes you can:
1)change the primary key (not _id)
2)edit the file EditableSaver.php find
this line
$this->model = CActiveRecord::model($this->modelClass)->findByPk($this->primaryKey);

to
$this->model = CActiveRecord::model($this->modelClass)->findByPk(new MongoId($this->primaryKey));


In mongoDB the _id is an object if it is not setted manually.

Bye :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users