Viewing 9 replies - 16 through 24 (of 24 total)
  • Plugin Author launchinteractive

    (@launchinteractive)

    The problem with not minifying min.js files is the order that MMR processes files:

    1) MMR builds a list of files that can be merged/minified
    2) MMR checks if the merged file exists and hasn’t been modified. If it exists it feeds the browser that version. If not then it generates a merged file and feeds it that. It also schedules a minification on the file which is done in the background.
    3) MMR minifies in the background so future requests get the modified version.

    In order to prevent the file minifying merged files twice I think MMR would need to split the merged file and process the pieces.

    I think I would prefer to use the script debug method or get the modified file fixed. From what I can tell is the else statements do nothing and aren’t required.. If they were removed then everything should work as expected.

    Thread Starter rmast

    (@rmast)

    Each time my site is broken and I need to investigate by hand is a risk that takes at least several hours from the moment someone informs me about it, so I look for a simple and robust solution that doesn’t break my site whenever WordPress or some plug-in comes with a new upgrade with a new issue, so every solution that involves correcting the broken site afterward is quite ‘expensive’.

    The ‘SCRIPT_DEBUG’ method as I understand doesn’t turn off minification of MMR. MMR will still play russian roulette depending on the minification method available (google/php). I can’t tell beforehand whether both minification-methods are more thrustworthy than the wordpress-one.

    I would then at least prefer to be able to let MMR stop minification completely, I however haven’t found an option for that.

    Thread Starter rmast

    (@rmast)

    I tried your suggestion of putting define( ‘SCRIPT_DEBUG’, true ); in wp-config.php.

    This didn’t repair the site. The cheap hoster doesn’t allow JAVA, so while PHP exec is allowed if you really need it, JAVA is still the missing part. The JAVA minifying via PHP-exec does not break the site on the same script (I tried it on the dedicated host after installing JAVA), so it’s probably a more robust, but also more infrastructure-dependent minifier. The hoster suggests to go (virtually) dedicated ??

    Plugin Author launchinteractive

    (@launchinteractive)

    I know what you mean about it being hard to track down where the errors are. I’m working on an update that will give you the ability to turn off minification as well as merging and the ability to ignore certain scripts. This should help the debug process.

    Maybe I should look into the Closure Compiler Service API. This could be another option for when exec/java aren’t available.

    Thread Starter rmast

    (@rmast)

    You can probably borrow some code from the Closure Compiler Service UI:
    https://developers.google.com/closure/compiler/docs/gettingstarted_ui

    Thread Starter rmast

    (@rmast)

    As the example above concerns js the php I found will be even easier to use I guess:

    https://code.google.com/p/php-closure/source/browse/trunk/php-closure.php

    Thread Starter rmast

    (@rmast)

    This piece of code will already give your closure minified result without java and php exec: (ending on trailing ^M)

    <?php
    include(“php-closure.php”);

    $c = new PhpClosure();
    $c->add(“wp-embed.min.js”) // file to be minified
    ->hideDebugInfo()
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir(“/tmp/js-cache/”) // directory to store minified files
    ->write();
    ?>

    Plugin Author launchinteractive

    (@launchinteractive)

    For now I have decided to not add support for the closure compiler service. The reason is I think that PHP minify is a decent fallback and the closure compiler service would add extra complexity to MMR. Please start a new thread if you would really like this added.

    Thread Starter rmast

    (@rmast)

    As I didn’t know closure before I saw your plugin I even don’t know whether Google will make such a service a paid service, so I don’t know whether that would be a solution.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Clash with slideshow 2.3.1 in WordPress 4.4’ is closed to new replies.