massedge / wordpress-plugin-export-media-library

WordPress plugin that allows users to export media library files as a compressed zip archive.
https://wordpress.org/plugins/export-media-library/
GNU General Public License v3.0
10 stars 4 forks source link

"Windows cannot open the folder" #31

Closed MadtownLems closed 4 years ago

MadtownLems commented 4 years ago

Hi there!

I just installed v3.0.0, and tried exporting the media library using all 4 combinations of options (single/nested compressed/uncompressed), and every single one gives the following error when I try to unzip it:

"Windows cannot open the folder. The Compressed (zipped) Folder 'C:Users..._export.zip' is invalid."

There's nothing relevant in the php error_log.

Per a different/similar issue, I saw you recommended 7-Zip. Here's some information from 7 Zip when trying to unzip:

1 Headers Error Unconfirmed start of archive Warnings: There are some data after the end of the payload data 2 Data error: 2020-05-18_18-33-04_media_library_export\2020\05\bear.jpg

Total size: 198K Compressed size: 197K

andrejpavlovic commented 4 years ago

My guess would be that the server closes the connection before the archive is fully downloaded. Usually if it happens, a lot more than 198K of data would be downloaded, so I'm not sure why it closes the connection so quickly. Probably the amount of output buffering allowed on the server is very low, but I'm just making a guess here... Can you share the downloaded archive somewhere so I can take a look?

MadtownLems commented 4 years ago

Update: I gave it a try with WP_DEBUG disabled and it worked as expected. I'm guessing that some plugin's php notice was getting written into the ZIP file, corrupting it.

cheers!

andrejpavlovic commented 4 years ago

Makes sense, good work!