Bug #24590
closedTrouble with new EM: Download from chosen repository not possible + choice not remembered in GUI
0%
Description
When I try to download extensions with the new Extension Manager, I always get the following error:
The T3X file could not be fetched. Possible reasons: network problems, allow_url_fopen is off, curl is not enabled in Install tool.
After long debugging I found the responsible part in file /sysext/em/classes/index.php in line 1216:
changing "$this->MOD_SETTINGS['selectedMirror']" to "$this->MOD_SETTINGS['selectedRepository']" solved my problem.
$this->MOD_SETTINGS['selectedMirror'] is the mirror-url, $this->MOD_SETTINGS['selectedRepository'] an integer value.
$mirrors is a numerical array, so it expects an integer value.
I have also problems with the translation handling.
When I check against repository, I got always the message "not available".
(issue imported from #M17054)
Updated by Steffen Kamper almost 14 years ago
there is no different behaviour with settings of selectedMirror in old/new em.
Could you verify download in old em?
mirror and repository are different. The main repository(1) has mirror urls, or empty string for random. This is handled in the repository_utility class, with new em have a look in tx_em_Connection_ExtDirectServer::getMirrorUrl
Updated by Rupert Germann over 13 years ago
I can confirm this issue: when selecting anything else than the "random" Repository in the settings tab I can't download/update extensions anymore.
additionally the remote Repository tab always shows the TYPO3.org main repository no matter what I have selected in the settings tab.
Updated by Matthias Toscanelli over 13 years ago
- Target version deleted (
0)
Changing "$this->MOD_SETTINGS['selectedMirror']" to "$this->MOD_SETTINGS['selectedRepository']" will not correctly solve your problem, because repository and mirror are two things different. In your case, it will take always second mirror (default repository = 1).
This bug comes from "tx_em_Import_MirrorListImporter->getMirrors". (Line 91)
This function use a parser to parse the mirrors xml file that returns a numerical array. (line 75)
There is two function that parse mirrors (getMirrors), once in /sysext/em/classes/index.php the other in /sysext/em/classes/repository/class.tx_em_repository_utility.php. Mirrors are parsed only one time for each BE user, then it get infos from MOD preferences.
If the first time mirrors are parsed by "tx_em_Import_MirrorListImporter->getMirrors" you will have this bug, else you will not.
- Clear BE user datas (Because parsed mirrors are stored in user datas).
- Change "getMirrors" function in /sysext/em/classes/repository/class.tx_em_repository_utility.php.
public function getMirrors($localMirrorListFile) { $zlibStream = 'compress.zlib://'; $this->parser->parseXML($zlibStream . $localMirrorListFile); $objRepositoryMirrors = t3lib_div::makeInstance('tx_em_Repository_Mirrors'); /** PATCH Matthias Toscanelli **/ $mirrors = array(); if(is_array($this->arrTmpMirrors)){ foreach($this->arrTmpMirrors as $mkey=>$mval){ // Keep numerical array to prevent bugs with functions that needs a numerical array. $mirrors[$mkey] = $mval; // Add host based index if host exists. if($mval['host']){ $mirrors[$mval['host']] = $mval; } } } $objRepositoryMirrors->setMirrors($mirrors); /** END PATCH **/ $this->arrTmpMirrors = array(); return $objRepositoryMirrors; }
Updated by Alexander Opitz over 10 years ago
- Status changed from New to Needs Feedback
- Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.3)?
Updated by Alexander Opitz about 10 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.