Bug #45825
closedProblems with Install Tool and PostgreSQL
0%
Description
I have identified the following two problem with using the Typo3 Install Tool with Postgres:
1. in "typo3\sysext\install\Classes\CoreUpdates\AddFlexFormsToAclUpdate.php lines 102-103 look like this:
$where = 'deleted = 0 AND non_exclude_fields IS NOT NULL AND non_exclude_fields != ""'; $where .= ' AND (tables_select LIKE "%' . $search . '%" OR tables_modify LIKE "%' . $search . '%")';
in postgres strings should be wrapped in single-quotes and not double quotes. so these lines should look like this:
$where = "deleted = 0 AND non_exclude_fields IS NOT NULL AND non_exclude_fields != ''"; $where .= " AND (tables_select LIKE '%" . $search . "%' OR tables_modify LIKE '%" . $search . "%')";
2. a second problem lies with line 100 in the file typo3\sysext\install\Classes\Updates\TtContentUploadsUpdateWizard.php
this line reads:
$notMigratedRowsCount = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'tt_content', 'media <> \'\' AND CAST(CAST(media AS DECIMAL) AS CHAR) <> media OR (CType = \'uploads\' AND select_key != \'\')');
the resulting statement leads to an uncaught typo3 exception:
Uncaught TYPO3 Exception #1310027511: Could not parse where clause (More information) InvalidArgumentException thrown in file .../typo3/sysext/dbal/Classes/Database/DatabaseConnection.php in line 1680.
unfortunately i wasn't able to find out the exact reason for this second problem and wasn't able to solve it.
Updated by Michael Stucki over 11 years ago
Can you check if it helps to change "media <> \'\'" into "media != \'\'"?
Updated by Michael Stucki over 11 years ago
- Status changed from New to Needs Feedback
Updated by Gerald Buttinger over 11 years ago
Michael Stucki wrote:
Can you check if it helps to change "media <> \'\'" into "media != \'\'"?
sorry for the late answer! unfortunately this didn't help. i experimented around a bit more, and it seems the problem lies definitely within this part of the where-clause:
'CAST AS CHAR) <> media'
(changing "<>" into "!=" didn't help here either.)
Updated by Michael Stucki over 11 years ago
Xavier, do you know what we can do about this? Any idea why the CAST(CAST(...))
is neccessary?
Updated by Xavier Perseguers over 11 years ago
Yes, I guess I know why they did that, the idea behind is to find rows where there is a list of filenames and not a list of ids which would tell that the migration wizard already processed the row.
But I guess it is likely to fail as well if there is a list of ids and not a "single" filename referenced as an id.
<>''
won't work either, please see https://forge.typo3.org/projects/extension-dbal/wiki/DBAL_Cookbook_for_Extension_Developer
Updated by Michael Stucki almost 11 years ago
- Project changed from 329 to TYPO3 Core
Updated by Alexander Opitz over 10 years ago
- Status changed from Needs Feedback to New
- Is Regression set to No
Updated by Riccardo De Contardi over 9 years ago
- Assignee set to Morton Jonuschat
Updated by Morton Jonuschat over 9 years ago
- Status changed from New to Closed
Topic 1 is no longer relevant since this updater was only used before TYPO3 6.2 and is no longer part of the core.
Topic 2 has been solved with issue #56390