Skip to content

Instantly share code, notes, and snippets.

@montrealist
Last active October 1, 2023 15:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save montrealist/34940cbebcaa62477ff1 to your computer and use it in GitHub Desktop.
Save montrealist/34940cbebcaa62477ff1 to your computer and use it in GitHub Desktop.
WordPress revslider error: slider_export.txt does not exist - Solution

WordPress revslider: slider_export.txt does not exist

problem:

The Slider Revolution WordPress plugin (version 5.1 and earlier) produces an error when one tries to export a slider, and then import the resulting ZIP file into another WordPress installation. The error verbatim:

importing slider settings and data...
Error: slider_export.txt does not exist!

issue:

When I went into the revslider code, I discovered the following line in slider.class.php:

$unzipfile = unzip_file( $filepath, $d_path);
if ( $unzipfile ) {

If you check the doc, it says that unzip_file will return either true (if the operation was successful) or a WP_Error instance. The if will therefore always pass, even when unzip_file returns an error. Very bad code for a paid plugin (personal subjective opinion).

To discover what your particular issue is, you can enable debugging in WordPress and insert the following line between the two lines above:

error_log( 'unzipfile returned: '. print_r( $unzipfile, true ) );

solution:

In my case, there was something wrong with the archive. Here is what the error object contained:

[32-Dec-2015 17:13:42 UTC] unzipfile: WP_Error Object
(
    [errors] => Array
        (
            [incompatible_archive] => Array
                (
                    [0] => Incompatible Archive.
                )
    )
[error_data] => Array
    (
        [incompatible_archive] => PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
    )
)

There was something wrong with the ZIP file itself. I got a clue from this post: unzip the archive and zip it again. That worked for me like a charm (thank you, thefighter14).

unzip -l slider_name.zip
zip -r slider_name_new.zip *

Hope it helps at least one person (please put a star on this if it helped you - I'd like to know).

@shk-trix
Copy link

Ya lo solucione incluso funciona con las licencias GPL o las piratita.
Probe lo qu epense que seria una tonteria pero funciono a la primera, voy a realizar un video tutorial para que puedan solucionarlo.

@junior-charris
Copy link

Ya lo solucione incluso funciona con las licencias GPL o las piratita. Probe lo qu epense que seria una tonteria pero funciono a la primera, voy a realizar un video tutorial para que puedan solucionarlo.

Podrías ayudarme con la solución por favor, he intentado pero no logro resolverlo.

@amirrezakia
Copy link

This problem has occurred in recent versions.
Roll back, for example, to version 6.6.15 and install the desired slider. Then update the plugin again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment