Bug #84738
closedDoctrine\DBAL\Exception\SyntaxErrorException in CType: menu_categorized_content
100%
Description
TYPO3 CMS Version 9 (master) and 8.x
Caused by TypoScript/SQL (PHP Version does not matter)
Steps to reproduce: Create a new element with CType menu_categorized_content
and do not select any Categories ('Selected categories'/tt_content.selected_categories
).
Uncaught TYPO3 Exception An exception occurred while executing 'SELECT tt_content.* FROM `tt_content` INNER JOIN ... AND sys_category_record_mm.uid_local IN() WHERE ... Doctrine\DBAL\Exception\SyntaxErrorException thrown in file .../vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php in line 90.
My quick and dirty fix (for MariaDB/MySql) is to simply add 0
to the SQL IN()
part:
tt_content.menu_categorized_content.dataProcessing.10 { # Alter the existing query # join.wrap = sys_category_record_mm ON uid = sys_category_record_mm.uid_foreign AND sys_category_record_mm.uid_local IN(|) join.wrap = sys_category_record_mm ON uid = sys_category_record_mm.uid_foreign AND sys_category_record_mm.uid_local IN(0|) # OR add the zero using stdWrap join.stdWrap.wrap = 0| }
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56679
Updated by Georg Ringer over 6 years ago
instead of fixing the TS I propose to fix the UI and force editors to define categories
Updated by Georg Tiefenbrunn over 6 years ago
Georg Ringer wrote:
instead of fixing the TS I propose to fix the UI and force editors to define categories
Yes, that's the better solution!
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56684
Updated by Georg Ringer over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1b64feb6ef704efa472d8796310fe44e78f1d1eb.