Closed Kancelaria2019 closed 4 years ago
Proszę, korzystaj z wyszukiwarki na GitHub-ie. Sprawdź czy błąd już nie został wcześniej zgłoszony. https://github.com/YetiForceCompany/YetiForceCRM/issues/12768 https://github.com/YetiForceCompany/YetiForceCRM/issues/12782
Podczas dodawania rekordy do bazy w zakładce kontrahenci pojawia się komunikat. Dotychczas do importu danych był wykorzystywany moduł importowy. Po imporcie z pliku csv zaczęły pojawiać się błędy:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8554' for key 'PRIMARY' The SQL being executed was: INSERT INTO u_yf_crmentity_label (crmid, label) VALUES (8554, 'Przykładowa firma').
Śledzenie wywołania funkcji:
vendor/yetiforce/yii2/db/Schema.php(674)
0 vendor/yetiforce/yii2/db/Command.php(1295): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO u...') #1 vendor/yetiforce/yii2/db/Command.php(1091): yii\db\Command->internalExecute('INSERT INTO u...')
2 app/Record.php(250): yii\db\Command->execute()
3 modules/Vtiger/handlers/RecordLabelUpdater.php(19): App\Record::updateLabelOnSave(Object(Accounts_Record_Model))
4 app/EventHandler.php(323): Vtiger_RecordLabelUpdater_Handler->entityAfterSave(Object(App\EventHandler))
5 modules/Vtiger/models/Record.php(503): App\EventHandler->trigger('EntityAfterSave')
6 modules/Vtiger/actions/Save.php(101): Vtiger_Record_Model->save()
7 modules/Vtiger/actions/Save.php(74): Vtiger_Save_Action->saveRecord(Object(App\Request))
8 include/main/WebUI.php(187): Vtiger_Save_Action->process(Object(App\Request))
9 index.php(28): Vtiger_WebUI->process(Object(App\Request))
10 public_html/index.php(11): require('i...')
11 {main}
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8556' for key 'PRIMARY' in vendor/maximebf/debugbar/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php:112 Stack trace:
0 vendor/maximebf/debugbar/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php(112): PDOStatement->execute(NULL)
1 app/Debug/DebugBar/TraceablePDOStatement.php(39): DebugBar\DataCollector\PDO\TraceablePDOStatement->execute(NULL)
2 vendor/yetiforce/yii2/db/Command.php(1290): App\Debug\DebugBar\TraceablePDOStatement->execute()
3 vendor/yetiforce/yii2/db/Command.php(1091): yii\db\Command->internalExecute('INSERT INTO `u_...')
4 app/Record.php(250): yii\db\Command->execute()
5 modules/Vtiger/handlers/RecordLabelUpdater.php(19): App\Record::updateLabelOnSave(Object(Accounts_Record_Model))
6 app/EventHandler.php(323): Vtiger_RecordLabelUpdater_Handler->entityAfterSave(Object(App\EventHandler))
7 modules/Vtiger/models/Record.php(503): App\EventHandler->trigger('EntityAfterSave')
8 modules/Vtiger/actions/Save.php(101): Vtiger_Record_Model->save()
9 modules/Vtiger/actions/Save.php(74): Vtiger_Save_Action->saveRecord(Object(App\Request))
10 include/main/WebUI.php(187): Vtiger_Save_Action->process(Object(App\Request))
11 index.php(28): Vtiger_WebUI->process(Object(App\Request))
12 public_html/index.php(11): require('i...')
13 {main}
Next yii\db\IntegrityException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8556' for key 'PRIMARY' The SQL being executed was: INSERT INTO u_yf_crmentity_label (crmid, label) VALUES (8556, 'klient testowy 2') in vendor/yetiforce/yii2/db/Schema.php:674 Stack trace:
0 vendor/yetiforce/yii2/db/Command.php(1295): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO u...') #1 vendor/yetiforce/yii2/db/Command.php(1091): yii\db\Command->internalExecute('INSERT INTO u...')
2 app/Record.php(250): yii\db\Command->execute()
3 modules/Vtiger/handlers/RecordLabelUpdater.php(19): App\Record::updateLabelOnSave(Object(Accounts_Record_Model))
4 app/EventHandler.php(323): Vtiger_RecordLabelUpdater_Handler->entityAfterSave(Object(App\EventHandler))
5 modules/Vtiger/models/Record.php(503): App\EventHandler->trigger('EntityAfterSave')
6 modules/Vtiger/actions/Save.php(101): Vtiger_Record_Model->save()
7 modules/Vtiger/actions/Save.php(74): Vtiger_Save_Action->saveRecord(Object(App\Request))
8 include/main/WebUI.php(187): Vtiger_Save_Action->process(Object(App\Request))
9 index.php(28): Vtiger_WebUI->process(Object(App\Request))
10 public_html/index.php(11): require('i...')
11 {main}
Additional Information: Array ( [0] => 23000 [1] => 1062 [2] => Duplicate entry '8556' for key 'PRIMARY'
0 [error] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8556' for key 'PRIMARY'
The SQL being executed was: INSERT INTO u_yf_crmentity_label (crmid, label) VALUES (8556, 'klient testowy 2') PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8556' for key 'PRIMARY' in vendor/maximebf/debugbar/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php:112 Stack trace:
0 vendor/maximebf/debugbar/src/DebugBar/DataCollector/PDO/TraceablePDOStatement.php(112): PDOStatement->execute(NULL)
1 app/Debug/DebugBar/TraceablePDOStatement.php(39): DebugBar\DataCollector\PDO\TraceablePDOStatement->execute(NULL)
2 vendor/yetiforce/yii2/db/Command.php(1290): App\Debug\DebugBar\TraceablePDOStatement->execute()
3 vendor/yetiforce/yii2/db/Command.php(1091): yii\db\Command->internalExecute('INSERT INTO `u_...')
4 app/Record.php(250): yii\db\Command->execute()
5 modules/Vtiger/handlers/RecordLabelUpdater.php(19): App\Record::updateLabelOnSave(Object(Accounts_Record_Model))
6 app/EventHandler.php(323): Vtiger_RecordLabelUpdater_Handler->entityAfterSave(Object(App\EventHandler))
7 modules/Vtiger/models/Record.php(503): App\EventHandler->trigger('EntityAfterSave')
8 modules/Vtiger/actions/Save.php(101): Vtiger_Record_Model->save()
9 modules/Vtiger/actions/Save.php(74): Vtiger_Save_Action->saveRecord(Object(App\Request))
10 include/main/WebUI.php(187): Vtiger_Save_Action->process(Object(App\Request))
11 index.php(28): Vtiger_WebUI->process(Object(App\Request))
12 public_html/index.php(11): require('i...')
13 {main}
Next yii\db\IntegrityException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8556' for key 'PRIMARY' The SQL being executed was: INSERT INTO u_yf_crmentity_label (crmid, label) VALUES (8556, 'klient testowy 2') in vendor/yetiforce/yii2/db/Schema.php:674 Stack trace:
0 vendor/yetiforce/yii2/db/Command.php(1295): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO u...') #1 vendor/yetiforce/yii2/db/Command.php(1091): yii\db\Command->internalExecute('INSERT INTO u...')
2 app/Record.php(250): yii\db\Command->execute()
3 modules/Vtiger/handlers/RecordLabelUpdater.php(19): App\Record::updateLabelOnSave(Object(Accounts_Record_Model))
4 app/EventHandler.php(323): Vtiger_RecordLabelUpdater_Handler->entityAfterSave(Object(App\EventHandler))
5 modules/Vtiger/models/Record.php(503): App\EventHandler->trigger('EntityAfterSave')
6 modules/Vtiger/actions/Save.php(101): Vtiger_Record_Model->save()
7 modules/Vtiger/actions/Save.php(74): Vtiger_Save_Action->saveRecord(Object(App\Request))
8 include/main/WebUI.php(187): Vtiger_Save_Action->process(Object(App\Request))
9 index.php(28): Vtiger_WebUI->process(Object(App\Request))
10 public_html/index.php(11): require('i...')
11 {main}
Additional Information: Array ( [0] => 23000 [1] => 1062 [2] => Duplicate entry '8556' for key 'PRIMARY'