Project

General

Profile

Actions

Bug #43113

closed

Problems with Extension Manager and PostgreSQL

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

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2012-11-19
Due date:
% Done:

0%

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

Description

the Extension Manager of TYPO3 v.4.7.7 (and possibly others) is not working on installations at PostrgreSQL-databases using DBAL.

import works, but only the installed extensions are displayed.

the problems lie in the function "getExtensionListFromRepository" in file "typo3/sysext/em/classes/database/class.tx_em_database.php". the SELECT-statement in line 100 fails for the following reasons:

1. the content of the parameter $andWhere is delivered to the function e.g. this way:

AND cache_extensions.extkey IN ("about","aboutmodules",.....

in postgres, this where-clause is not valid. the strings in the IN-brackets must be encapsulated in single quotes.
a quick fix is to put this line at the beginning of the function:

$andWhere = str_replace('"',"'",$andWhere);

2. "ce.extkey" is the only column stated in the groupBy-clause, but all other columns are also present in the select-part (cache_extensions.*). in postgres every selected column, which is not in an aggreagete-function, must appear in the groupBy-clause.

i simply fixed this by removing the groupBy and the aggregate function - as well as the join (i didn't get the meaning of that join anyway).

the select-call looks like this now:

$ret['results'] = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'cache_extensions.*, cache_extensions.intversion AS maxintversion' .
($addFields === '' ? '' : ',' . $addFields),
'cache_extensions',
'cache_extensions.lastversion=1 AND cache_extensions.repository=' . intval($repository) . $andWhere,
'',
$order,
$limit
);

of course, these fixes are quick hacks by me to get the EM working. someone with more knowledge of the EM should probably integrate some proper fixes.

Actions #1

Updated by Gerald Buttinger over 11 years ago

  • Project changed from 2269 to 329
Actions #2

Updated by Gerald Buttinger over 11 years ago

i don't really know, if this bug belongs in the "Extension Manager" or the "DBAL" project. i've moved it to DBAL, because i just recalled, that another bug (http://forge.typo3.org/issues/38406), which concerned postgreSQL and the Extension Manager, was posted here a while ago (also by me), and was already fixed. this older bug concerned the import of extensions, which is working now (thanks!), but this newly found bug is still preventing the proper usage of the Extension Manager under postgres (see bug description above).

Actions #3

Updated by Michael Stucki over 10 years ago

  • Project changed from 329 to TYPO3 Core
Actions #4

Updated by Michael Stucki over 10 years ago

  • Category set to 999
Actions #5

Updated by Mathias Schreiber over 9 years ago

  • Target version set to 8 LTS
  • Is Regression set to No
Actions #6

Updated by Morton Jonuschat almost 9 years ago

  • Assignee set to Morton Jonuschat
Actions #7

Updated by Morton Jonuschat almost 9 years ago

  • Status changed from New to Closed

Closing as the statement is no longer in use, the extension manager has been rewritten at least twice by now.

Actions

Also available in: Atom PDF