Bug #89350
closedColumn name not getting quotes wich are mandatory on postgres
0%
Description
referencing colPos from typoscript FLUIDTEMPLATE like so
mycontent < styles.content.get mycontent.select.where = colPos = 0
Results in the frontend throwing an Doctrine\DBAL\Exception\InvalidFieldNameException
An exception occurred ... 'SELECT * FROM "tt_content" WHERE ... (colPos = 0) ...
... HINT: Vielleicht wurde beabsichtigt, auf die Spalte »tt_content.colPos« zu verweisen.
Meaning of the Error: since upper case is a special char for postgres quotes are required around the column name eg. "colPos" not colPos, colpos or "colpos".
I expected this database naming conventions to be handled by DBAL.
Workaround - add the missing quotes to typoscript yourself:
mycontent.select.where = "colPos" = 0
Typo3 9.5.9 LTS
Postgres 10.7
php driver pdo_pgsql
Updated by Andreas Kienast about 5 years ago
- Status changed from New to Needs Feedback
Can you please check whether https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/8.7/Important-80506-DbalCompatibleFieldQuotingInTypoScript.html solves your issue?
Updated by Gerhard Heide about 5 years ago
Using the syntax
select.where = {#colPos} = 0
as suggested above, in fact solves the problem, thanks.
Updated by Georg Ringer about 5 years ago
- Status changed from Needs Feedback to Closed
closing issue as solved