Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-2448

Unable to refresh entity after save

    XMLWordPrintable

Details

    • High
    • Fixing an error which may occur when using pre-translation with enabled batch mode of language resources.

    Description

      Problem

      After saving entity (ZfExtended_Models_Entity_Abstract->save()) in some cases after the entity is saved to the database, Zend is not able to reload/refresh the same entity. This throws an exception:

      Exception:Zend_Db_Table_Row_Exception Level:ERROR Errorcode:E9999 Message:Cannot refresh row as parent is missing Domain:core Version:5.1.1 File (Line):/webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Db/Table/Row/Abstract.php (775) Request:PUT /editor/worker/18815 Trace: #0 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Db/Table/Row/Abstract.php(497): Zend_Db_Table_Row_Abstract->_refresh() #1 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Db/Table/Row/Abstract.php(438): Zend_Db_Table_Row_Abstract->_doInsert() #2 /webs/instance-1031/library/ZfExtended/Models/Entity/Abstract.php(283): Zend_Db_Table_Row_Abstract->save() #3 /webs/instance-1031/application/modules/editor/Services/Connector/BatchTrait.php(182): ZfExtended_Models_Entity_Abstract->save() #4 /webs/instance-1031/application/modules/editor/Services/Connector/BatchTrait.php(149): editor_Plugins_DeepL_Connector->saveBatchResults(94076) #5 /webs/instance-1031/application/modules/editor/Services/Connector/BatchTrait.php(105): editor_Plugins_DeepL_Connector->handleBatchQuerys(Array) #6 /webs/instance-1031/application/modules/editor/Services/Connector.php(192): editor_Plugins_DeepL_Connector->batchQuery('{a03557cb-bf66-...') #7 /webs/instance-1031/application/modules/editor/Plugins/MatchAnalysis/BatchWorker.php(73): editor_Services_Connector->__call('batchQuery', Array) #8 /webs/instance-1031/library/ZfExtended/Worker/Abstract.php(513): editor_Plugins_MatchAnalysis_BatchWorker->work() #9 /webs/instance-1031/library/ZfExtended/Worker/Abstract.php(457): ZfExtended_Worker_Abstract->_run() #10 /webs/instance-1031/library/ZfExtended/Controllers/WorkerController.php(123): ZfExtended_Worker_Abstract->runQueued() #11 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(516): ZfExtended_WorkerController->putAction() #12 /webs/instance-1031/library/ZfExtended/Controllers/AAARestController.php(286): Zend_Controller_Action->dispatch('putAction') #13 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Controller/Dispatcher/Standard.php(308): ZfExtended_RestController->dispatch('putAction') #14 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(REST_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #15 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() #16 /webs/instance-1031/vendor/shardj/zf1-future/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #17 /webs/instance-1031/library/ZfExtended/Application.php(47): Zend_Application->run() #18 /webs/instance-1031/library/ZfExtended/BaseIndex.php(149): ZfExtended_Application->run() #19 /webs/instance-1031/public/index.php(35): ZfExtended_BaseIndex->startApplication() #20 {main}
      

      This error occures multiple times, and it seams like that all of them are in worker context. The reason is that, after entity -> save the database adapter (PDO in our case), is not able to retrieve the lastInsertedId (the value is 0,"" or null). 

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            aleksandar Aleksandar Mitrev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: