Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @dscelectronicsde,

    Sorry, I mistyped the second code change.

    Obviously this is only a short term fix. It’s never a good idea to modify plugin code directly but the only solutions I could find using hooks were clunky.

    Minify_AutoCss.php
    Line 208: Change…
    $step2 = !in_array( $file, $this->ignore_css_files );
    To…
    $step2 = !in_array( preg_replace("/^\//", "", $file), $this->ignore_css_files );

    Minify_AutoJS.php
    Line 212: Change…
    $step2 = !in_array( $file, $this->ignore_js_files );
    To…
    $step2 = !in_array( preg_replace("/^\//", "", $file), $this->ignore_js_files );

    Hi @vmarko,

    I have the same problem on my IIS server. It’s because the relative paths to styles/scripts include a leading forward slash but the paths to the ignored files do not have a leading slash. This is true even if you add a leading slash to your ignore CSS/JS list via the minify settings.

    The problem can be fixed by a small change to Minify_AutoCss.php and Minify_AutoJS and I hope this can be reviewed and incorporated into a release soon.

    Minify_AutoCss.php
    Line 208: Change…
    $step2 = !in_array( $file, $this->ignore_css_files );
    To…
    $step2 = !in_array( preg_replace("/^\//", "", $file), $this->ignore_css_files );

    Minify_AutoCss.php
    Line 212: Change…
    $step2 = !in_array( $file, $this->ignore_js_files );
    To…
    $step2 = !in_array( preg_replace("/^\//", "", $file), $this->ignore_js_files );

    • This reply was modified 6 years, 9 months ago by vxfusion.
Viewing 2 replies - 1 through 2 (of 2 total)