Project

General

Profile

Actions

Bug #38406

closed

Extension Import not working with postgresql and DBAL

Added by Gerald Buttinger over 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2012-06-26
Due date:
% Done:

100%

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

Description

the import of extensions is not working completely with DBAL on postgresql.

the problem lies in the function "insertLastVersion" in the file:
"/typo3/sysext/em/classes/database/class.tx_em_database.php"

on line 220, the following code:

$groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'extkey, version, max(intversion) maxintversion',
'cache_extensions',
'repository=' . intval($repositoryUid),
'extkey'
);

... results in the following SQL-statement:

SELECT "extkey", "version", max("intversion") "maxintversion" FROM "cache_extensions" WHERE "repository" = 1 GROUP BY "extkey"

this is not valid in postgres due to:
1. "as" missing between max("intversion") and "maxintversion"
2. "version" missing from the group-clause

thus, the code must be changed to the following:

$groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'extkey, version, max(intversion) as maxintversion',
'cache_extensions',
'repository=' . intval($repositoryUid),
'extkey, version'
);

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #39056: Tagging of latest extension not possible due to Closed2012-07-18

Actions
Actions

Also available in: Atom PDF