-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Suggested solution:
Instead of empty query it should return null.
Description:
pimcore/vendor/pimcore/generic-data-index-bundle/src/Service/SearchIndex/IndexService/ElementTypeAdapter/DocumentTypeAdapter.php has been added since v1.0.5 of generic-data-index-bundle.
The getRelatedItemsOnUpdateQuery method return a QueryBuilder that breaks the enqueueRelatedItemsOnUpdate method in pimcore/vendor/pimcore/generic-data-index-bundle/src/Service/SearchIndex/IndexQueue/EnqueueService.php
Changing the getRelatedItemsOnUpdateQuery method to return null eliminates the error logs and behaves more like v1.0.5.
Steps to reproduce:
- Create a headless document.
Result:
ERROR [pimcore] Update indexQueue in database-table generic_data_index_queue failed! Error: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON DUPLICATE KEY
UPDATE
operation = VALUES(operation),
' at line 4