wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 15 forks source link

Empty language pack ZIP #168

Closed florianbrinkmann closed 4 years ago

florianbrinkmann commented 4 years ago

Issue Overview After already playing around with Traduttore some time ago, I gave it a try again today and had a problem with empty language pack ZIPs. After some debugging I found out that the issue was the .tmp ending of the temporary ZIP file with the ZipArchive::CREATE.

https://github.com/wearerequired/traduttore/blob/3.0.0/inc/ZipProvider.php#L150-L152

It worked when I either created a $temp_zip_file with .zip ending or changed the CREATE to OVERWRITE.

My first try with Traduttore was on the same server, and it worked back then, so it is a little bit strange.

To Reproduce Steps to reproduce the behavior: In my case: run the wp traduttore language-pack build WP CLI command and the generated ZIP is empty.

Versions

ocean90 commented 4 years ago

Thanks for the report! Can you check what error code $zip->open() is returning?

florianbrinkmann commented 4 years ago

Yes, it returns the Code 19. Reading the comments on the php.net site, that is Not a zip archive.