Project

General

Profile

Actions

Bug #45825

closed

Problems with Install Tool and PostgreSQL

Added by Gerald Buttinger over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2013-02-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Michael Stucki over 11 years ago

Can you check if it helps to change "media <> \'\'" into "media != \'\'"?

Actions #2

Updated by Michael Stucki over 11 years ago

  • Status changed from New to Needs Feedback
Actions #3

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.)

Actions #4

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?

Actions #5

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

Actions #6

Updated by Michael Stucki almost 11 years ago

  • Category deleted (PostgreSQL)
Actions #7

Updated by Michael Stucki almost 11 years ago

  • Project changed from 329 to TYPO3 Core
Actions #8

Updated by Michael Stucki almost 11 years ago

  • Category set to 999
Actions #9

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to New
  • Is Regression set to No
Actions #10

Updated by Riccardo De Contardi over 9 years ago

  • Assignee set to Morton Jonuschat
Actions #11

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

Actions

Also available in: Atom PDF