• Automatic js minify causes trouble as the order of the files is altered. In my case jquery was not loaded as the first js.

    The cause for this error is in extract.php, w3_extract_js(). The function array_unique() sorts the array of files and causes the dependency-problems.

    A quick&dirty fix is:
    $files = array_unique($files);
    ksort($files);
    $files = array_values($files);

    or better to replace it with something like:

    foreach ($files as $file) {
    if (!in_array($the_files, $file)) { $the_files[ ] = $file; }
    }

    I hope this could be in the next version.

    http://wordpress.org/extend/plugins/w3-total-cache/

  • The topic ‘solution for js minify bug’ is closed to new replies.