quickapps / cms

Modular CMS powered by CakePHP
GNU General Public License v3.0
164 stars 69 forks source link

Error on admin/locale/languages/move #58

Closed Gabri closed 12 years ago

Gabri commented 12 years ago

Hi Chris,

Latest sources QACMS v1.1 I was in admin/locale/languages and i clicked on the "move up" link of my third (default) language and I had this error page:

Notice (8): Undefined offset: 0 [APP/Plugin/Locale/Model/Language.php, line 105] Notice (8): Undefined offset: -1 [APP/Plugin/Locale/Model/Language.php, line 113] Notice (8): Undefined offset: 0 [APP/Plugin/Locale/Model/Language.php, line 114] Database Error Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'code' SQL Query: INSERT INTO qa3.qa_languages (ordering) VALUES (1) Notice: If you want to customize this error message, create /home/gabri/workspace/qa3/View/Errors/pdo_error.ctp Stack Trace APP/Cake/Model/Datasource/DboSource.php line 461 → PDOStatement->execute(array) APP/Cake/Model/Datasource/DboSource.php line 427 → DboSource->_execute(string, array) APP/Cake/Model/Datasource/DboSource.php line 1009 → DboSource->execute(string) APP/Cake/Model/Model.php line 1705 → DboSource->create(Language, array, array) APP/Cake/Model/Model.php line 1557 → Model->save(array, array) APP/Plugin/Locale/Model/Language.php line 123 → Model->saveField(string, integer, boolean) APP/Plugin/Locale/Controller/LanguagesController.php line 132 → Language->move(string, string) [internal function] → LanguagesController->admin_move(string, string) APP/Cake/Controller/Controller.php line 485 → ReflectionMethod->invokeArgs(LanguagesController, array) APP/Cake/Routing/Dispatcher.php line 187 → Controller->invokeAction(CakeRequest) APP/Cake/Routing/Dispatcher.php line 162 → Dispatcher->_invoke(LanguagesController, CakeRequest, CakeResponse) CORE/qa3/webroot/index.php line 47 → Dispatcher->dispatch(CakeRequest, CakeResponse)