Bug #30918
closedupdate process language has false indication
0%
Description
When updating the language through the extension manager I get indication everywhere that the update has failed (language-not-available.png).
When I check again after the update it seems the update was succesfull anyway (language-not-available1.png).
It looks like the status when updating is not correct.
Files
Updated by Ben van 't Ende about 13 years ago
Updated by Xavier Perseguers about 13 years ago
- Status changed from New to Needs Feedback
Does it really still apply to 4.6? Cannot reproduce!
Updated by Markus Klein about 13 years ago
It seems to happen only when there is already an existing translation.
If I clear the typo3temp folder first, it works without a problem.
Side note: I'm testing on a server with a slow connection.
Updated by Chris topher about 13 years ago
- Target version changed from 4.6.0 to 4.6.1
Updated by Oliver Salzburg about 13 years ago
I experience this issue in 4.5.6 as well.
Updated by Stephan Großberndt about 13 years ago
I have the same problem in 4.6.0
Updated by Chris topher almost 13 years ago
- Target version changed from 4.6.1 to 4.6.2
Updated by Oliver Salzburg almost 13 years ago
It still exists in 4.5.10 in case someone was wondering.
Updated by Oliver Salzburg almost 13 years ago
So I did a little digging myself and here is what I found.
The core problem here is the tx_em_Tools_Unzip
class.tx_em_Connection_Ter::updateTranslation
will call tx_em_Tools::unzip
tx_em_Tools::unzip
sees that I did not supply a path to the unzip utility and decides to use the internal class tx_em_Tools_Unzip
.
It will now assume that the return value of tx_em_Tools_Unzip::unzip
is an array when it completes successfully. This assumption seems to be false.
This results in tx_em_Tools::unzip
returning false
and tx_em_Connection_Ter::updateTranslation
returning FALSE
. Thus, it appears as if the process failed.
So a workaround is just to supply $GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path']
with a path to the unzip utility and everything works great again.
Updated by Markus Klein almost 13 years ago
Thanks Oliver for diggin'.
The workaround is pretty nice, still I'd like to see that fixed properly.
Do have a patch suggestions, which you could push to gerrit?
Updated by Oliver Salzburg almost 13 years ago
Sadly, I have no patch yet. But I was looking a bit more into the tx_em_Tools_Unzip
class and noticed that it logs errors. So I had a look at the error that causes it to behave as observed. For the extensions I have installed in the test environment I get these errors:
ARCHIVE_ZIP_ERR_BAD_FORMAT (-10) : Fail to find the right signature ARCHIVE_ZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Most interesting might be the fact that 1 update succeeds.
/powermail-l10n-de.zip NoName (1) :
So, back to the errors. To my understanding, they are generated at the end of the extraction process (in _readEndCentralDir
). But there's a little too much magic going on for me to tell if there is a problem in the code or if the zip file is actually damaged. In which case it might be a problem with the downloading of the file maybe.
Updated by Oliver Salzburg almost 13 years ago
I'm pretty confident that the issue is with the tx_em_Tools_Unzip
class. It is based on an older version of pclzip.lib.php
. I looked at the latest version of that library at http://www.phpconcept.net/pclzip and compared both versions.
pclzip has two modifications in the _readEndCentralDir
method (turns out one of the returned errors is simply not valid). Now all "Fail to find the right signature" errors are gone (yay). Sadly, most archives produce the "Unable to find End of Central Dir Record signature" error.
Updated by Xavier Perseguers almost 13 years ago
- Target version deleted (
4.6.2)
Updated by Oliver Salzburg over 12 years ago
- File class.tx_em_tools.php class.tx_em_tools.php added
Personally, I would like to see all of PHPs internal zip functionality exhausted before the broken tx_em_Tools_Unzip is used. I took the liberty of hacking the changes into tx_em_tools. Haven't tested any of this, but the idea should be clear.
Updated by Alexander Opitz about 11 years ago
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Oliver Salzburg about 11 years ago
Alexander Opitz wrote:
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?
On every new installation of TYPO3, setting an unzip utility is one of the first things I do, so I have no idea. But if tx_em_Tools_Unzip is still used anywhere in the code, then the problem still exists (unless the class was drastically updated).
Updated by Alexander Opitz almost 11 years ago
- Status changed from Needs Feedback to New
- Is Regression set to No
Updated by Susanne Moog over 10 years ago
- Category changed from Extension Manager to Language Manager (backend)
Updated by Riccardo De Contardi over 9 years ago
- Status changed from New to Needs Feedback
- Assignee set to Ben van 't Ende
Is this problem still valid in 6.2.12 or 7?
Updated by Oliver Salzburg over 9 years ago
Riccardo De Contardi wrote:
Is this problem still valid in 6.2.12 or 7?
The answer I posted a year ago is still a valid answer.
Updated by Riccardo De Contardi over 9 years ago
- Status changed from Needs Feedback to New
Updated by Markus Klein over 9 years ago
@Oliver can you please supply a patch to Gerrit?
Updated by Oliver Salzburg over 9 years ago
Markus Klein wrote:
@Oliver can you please supply a patch to Gerrit?
Sorry, but no. I was actively working on this issue 3 years ago. By now it no longer affects us due to aforementioned workaround. So the time it would take to get into the TYPO3 contribution process and writing a patch that's based on current TYPO3 versions is simply too much, given that we don't benefit from it.
If there is any value in the code I posted back then, then anyone is welcome to make use of it.
IMHO, if they still exist, PHP-based unzipping implementations should be completely removed from the TYPO3 code and PHP internal functions should be used, if no unzip binary is provided. IIRC, the PHP-based approach was only used back then because old versions of PHP did not have built-in unzip support. Given that those old versions of PHP are probably no longer supported by TYPO3 anyways, there is no need to have the faulty implementation.
Someone who is already a TYPO3 contributor and is familiar with the code base should be able to quickly determine if these changes are still necessary or if they were already implemented in the past 3 years, I am not.
Updated by Wouter Wolters over 8 years ago
- Status changed from New to Closed
Language update does not use this own zip implementation anymore, but relies on php functions.
This is at least the case for current master and 7.6 version.
I close this issue as solved now.