Actions
Bug #81751
closedLiveSearch in Backend broken using PostgreSQL
Start date:
2017-06-30
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
On Location Sprint
Description
Using the Backend LiveSearch in PostgreSQL is currently not possible as invoking it creates an exception.
The search condition 'andWhere' => 'CType=\'text\' OR CType=\'textpic\' OR CType=\'textmedia\''
of field bodytext
in table tt_content
kills it when using PostgreSQL because the fieldname CType
(note the uppercase letters) is not escaped, PostgreSQL assumes the field to be lowercase then and does not find a field named ctype
. The correct escaping depends on the database driver (MySQL uses backticks, PostgreSQL uses double quotes).
'bodytext' => [ 'l10n_mode' => 'prefixLangTitle', 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.text', 'config' => [ 'type' => 'text', 'cols' => '80', 'rows' => '15', 'softref' => 'typolink_tag,images,email[subst],url', 'search' => [ 'andWhere' => 'CType=\'text\' OR CType=\'textpic\' OR CType=\'textmedia\'' ] ] ],
In issue #80506 a solution was implemented to fix such issues in TypoScript. This can be adapted to be used in TCA 'andWhere' conditions.
Actions