OJS-3.4.0-7
PHP 8.1.22
MySQL 8.4.2
During log checking, we found some Fatal error
mentioned below. I have reviewed the table submission_search_object_keywords
and checked the foreign keys which were found to be fine. Please see this error.
PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`databse_name`.`submission_search_object_keywords`, CONSTRAINT `submission_search_object_keywords_object_id_foreign` FOREIGN KEY (`object_id`) REFERENCES `submission_search_objects` (`object_id`) ON in /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:545
Stack trace:
#0 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): PDOStatement->execute()
#1 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#3 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()
#4 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(498): Illuminate\Database\Connection->statement()
#5 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3274): Illuminate\Database\Connection->insert()
#6 /ojs/lib/pkp/classes/search/SubmissionSearchDAO.php(143): Illuminate\Database\Query\Builder->insert()
#7 [internal function]: PKP\search\SubmissionSearchDAO->PKP\search\{closure}()
#8 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map()
#9 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(768): Illuminate\Support\Arr::map()
#10 /ojs/lib/pkp/classes/search/SubmissionSearchDAO.php(143): Illuminate\Support\Collection->map()
#11 /ojs/classes/search/ArticleSearchIndex.php(346): PKP\search\SubmissionSearchDAO->insertObjectKeywords()
#12 /ojs/classes/search/ArticleSearchIndex.php(361): APP\search\ArticleSearchIndex->_indexObjectKeywords()
#13 /ojs/classes/search/ArticleSearchIndex.php(66): APP\search\ArticleSearchIndex->_updateTextIndex()
#14 /ojs/plugins/importexport/quickSubmit/QuickSubmitForm.php(453): APP\search\ArticleSearchIndex->submissionMetadataChanged()
#15 /ojs/plugins/importexport/quickSubmit/QuickSubmitPlugin.php(202): APP\plugins\importexport\quickSubmit\QuickSubmitForm->execute()
#16 /ojs/plugins/importexport/quickSubmit/QuickSubmitPlugin.php(75): APP\plugins\importexport\quickSubmit\QuickSubmitPlugin->_saveSubmit()
#17 /ojs/lib/pkp/pages/management/PKPToolsHandler.php(104): APP\plugins\importexport\quickSubmit\QuickSubmitPlugin->display()
#18 [internal function]: PKP\pages\management\PKPToolsHandler->importexport()
#19 /ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()
#20 /ojs/lib/pkp/classes/core/PKPPageRouter.php(278): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#21 /ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route()
#22 /ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch()
#23 /ojs/index.php(21): PKP\core\PKPApplication->execute()
#24 {main}
Next Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`databse_name`.`submission_search_object_keywords`, CONSTRAINT `submission_search_object_keywords_object_id_foreign` FOREIGN KEY (`object_id`) REFERENCES `submission_search_objects` (`object_id`) ON (SQL: insert into `submission_search_object_keywords` (`keyword_id`, `object_id`, `pos`) values (19170, 1001892, 0), (52483, 1001892, 1)) in /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
Stack trace:
#0 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#1 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()
#2 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(498): Illuminate\Database\Connection->statement()
#3 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3274): Illuminate\Database\Connection->insert()
#4 /ojs/lib/pkp/classes/search/SubmissionSearchDAO.php(143): Illuminate\Database\Query\Builder->insert()
#5 [internal function]: PKP\search\SubmissionSearchDAO->PKP\search\{closure}()
#6 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map()
#7 /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(768): Illuminate\Support\Arr::map()
#8 /ojs/lib/pkp/classes/search/SubmissionSearchDAO.php(143): Illuminate\Support\Collection->map()
#9 /ojs/classes/search/ArticleSearchIndex.php(346): PKP\search\SubmissionSearchDAO->insertObjectKeywords()
#10 /ojs/classes/search/ArticleSearchIndex.php(361): APP\search\ArticleSearchIndex->_indexObjectKeywords()
#11 /ojs/classes/search/ArticleSearchIndex.php(66): APP\search\ArticleSearchIndex->_updateTextIndex()
#12 /ojs/plugins/importexport/quickSubmit/QuickSubmitForm.php(453): APP\search\ArticleSearchIndex->submissionMetadataChanged()
#13 /ojs/plugins/importexport/quickSubmit/QuickSubmitPlugin.php(202): APP\plugins\importexport\quickSubmit\QuickSubmitForm->execute()
#14 /ojs/plugins/importexport/quickSubmit/QuickSubmitPlugin.php(75): APP\plugins\importexport\quickSubmit\QuickSubmitPlugin->_saveSubmit()
#15 /ojs/lib/pkp/pages/management/PKPToolsHandler.php(104): APP\plugins\importexport\quickSubmit\QuickSubmitPlugin->display()
#16 [internal function]: PKP\pages\management\PKPToolsHandler->importexport()
#17 /ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()
#18 /ojs/lib/pkp/classes/core/PKPPageRouter.php(278): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#19 /ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route()
#20 /ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch()
#21 /ojs/index.php(21): PKP\core\PKPApplication->execute()
#22 {main}
thrown in /ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 760
```