[BUG] Error messages from MariaDB while adding search plugin #1431
Copy link
Copy link
Open
Labels
☇ bugA non-security related bug.A non-security related bug.
Milestone
Description
Description
I created a new page in TYPO3, added the Kitodo collection plugin and then tried to add the search plugin, too. This is the result:
Extracted error messages:
# 1st error message
An error occurred trying to process items for field "Fields for extended search" (An exception occurred while executing 'SELECT `label`, `index_name` FROM `tx_dlf_metadata` WHERE (`tx_dlf_metadata`.`pid` = ) AND (`tx_dlf_metadata`.`sys_language_uid` IN (-1, 0)) AND (index_indexed=1) AND ((`tx_dlf_metadata`.`deleted` = 0) AND (`tx_dlf_metadata`.`hidden` = 0)) ORDER BY `label` ASC': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (`tx_dlf_metadata`.`sys_language_uid` IN (-1, 0)) AND (index_indexed=1)...' at line 1).
# 2nd error message
An error occurred trying to process items for field "Restrict search to these collections" (An exception occurred while executing 'SELECT `label`, `index_name` FROM `tx_dlf_metadata` WHERE (`tx_dlf_metadata`.`pid` = ) AND (`tx_dlf_metadata`.`sys_language_uid` IN (-1, 0)) AND (is_facet=1) AND ((`tx_dlf_metadata`.`deleted` = 0) AND (`tx_dlf_metadata`.`hidden` = 0)) ORDER BY `label` ASC': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (`tx_dlf_metadata`.`sys_language_uid` IN (-1, 0)) AND (is_facet=1) AND ...' at line 1).
# 3rd error message
An error occurred trying to process items for field "Show these facets" (An exception occurred while executing 'SELECT `label`, `index_name` FROM `tx_dlf_metadata` WHERE (`tx_dlf_metadata`.`pid` = ) AND (`tx_dlf_metadata`.`sys_language_uid` IN (-1, 0)) AND (is_facet=1) AND ((`tx_dlf_metadata`.`deleted` = 0) AND (`tx_dlf_metadata`.`hidden` = 0)) ORDER BY `label` ASC': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND (`tx_dlf_metadata`.`sys_language_uid` IN (-1, 0)) AND (is_facet=1) AND ...' at line 1).
This part of the SQL expressions is causing the errors: (tx_dlf_metadata.pid = ) (missing right side of condition).
Discarding the insertion of the search plugin and trying it again shows the same errors and these related messages in the TYPO3 log:
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Undefined array key "tx_dlf." in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Undefined array key "tx_dlf." in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Undefined array key "tx_dlf." in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Sat, 18 Jan 2025 12:54:33 +0000 [WARNING] request="65ee78fe2baf6" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Hooks/ItemsProcFunc.php line 87
Environment
- Kitodo.Presentation: latest main branch
- OS version: Debian GNU Linux 12
- RDBMS version: MariaDB 10.11.6
- Apache Solr version: 9.7.0
- TYPO3 version: 11.5.41
- PHP version: 8.2.26
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
☇ bugA non-security related bug.A non-security related bug.
Activity
stweil commentedon Jan 18, 2025
A search which is triggered by end users (for example by viewing the page with collections now causes runtime errors ("Oops"). Some of them are related to invalid SQL statements: