Bug #45140
closed
Download as Zip on Windows systems get invalid zip files
Added by Tobias Klepp over 11 years ago.
Updated almost 6 years ago.
Category:
Extension Manager
Description
If I click on "Download as Zip" in the extension manager on a windows system (Windows 7, 64 bit) and download the file, I can't install the extension on a linux system. The extension was uploaded but the install progress stop with the following error:
Extension Upload failed
PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Extensionmanager\Utility\InstallUtility::processDatabaseUpdates() must be an array, null given, called in /var/vhosts/domain.tld/html/typo3_src-6.0.1/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php on line 133 and defined in /var/vhosts/domain.tld/html/typo3_src-6.0.1/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php line 236
I looked in the file system and see, that the extension is there but the content of the extension directory is crazy. There are no sub directories. Every file name begins with a backslash. Filenames includes the complete path like "\Configuration\TypoScript\constants.txt" It looks like a windows/linux problem in the zip generation progress.
To fix this problem, I find in the file typo3_src-6.0.1/typo3/sysext/extensionmanager/Classes/Utility/FileHandlingUtility.php on line 354 the following code:
$zip->addFile($key, $archiveName);
and replace it with this code:
$zip->addFile($key, \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($archiveName));
I download my extension on a windows system and install it without error on a linux system.
In TYPO3 version 6.0.4 the extension manager is updated. Now I always get an zip file with 0 bytes. If I go through the code and create some test output, the function $zip->close(); (line 380) give me a false as the result on my Windows 7 PC.
Please check also for Windows compatibility! I need this basic funktionality!
- Status changed from New to Under Review
- Target version set to 2222
- Project changed from 2269 to TYPO3 Core
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Category set to Extension Manager
- Target version deleted (
2222)
- Status changed from Resolved to Closed
Also available in: Atom
PDF