Bug #43113
closedProblems with Extension Manager and PostgreSQL
0%
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.
Updated by Gerald Buttinger about 12 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).
Updated by Michael Stucki about 11 years ago
- Project changed from 329 to TYPO3 Core
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 8 LTS
- Is Regression set to No
Updated by Morton Jonuschat over 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.