WordPress.org

Forums

WP Minify
Breaks WooCommerce 2.1.x (3 posts)

  1. Wil
    Member
    Posted 1 year ago #

    As of WooCommerce 2.1.x WP Minify generates HTTP 400 Bad Request GET errors in Chrome Inspector.

    e.g.
    http://redacted.domain.com/wp-content/plugins/wp-minify/min/?f=
    wp-content/themes/buffdayspa/style.css
    wp-content/themes/buffdayspa/css/normalize.css
    wp-includes/css/dashicons.min.css
    wp-includes/css/admin-bar.min.css
    wp-content/plugins/revslider/rs-plugin/css/settings.css
    wp-content/plugins/revslider/rs-plugin/css/captions.css
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/css/chosen.css
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/css/woocommerce-layout.css
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/css/woocommerce-smallscreen.css
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/css/woocommerce.css
    wp-content/plugins/wordpress-seo/css/adminbar.css
    wp-content/plugins/wc-gateway-paypal-express/css/style.css
    wp-content/plugins/lime-canvas-support/css/display.css
    wp-content/plugins/woocommerce-menu-bar-cart/css/wcmenucart-main.css

    http://redacted.domain.com/wp-content/plugins/wp-minify/min/?f=wp-includes/js/jquery/jquery.js
    wp-includes/js/jquery/jquery-migrate.min.js
    wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.revolution.min.js
    wp-content/plugins/lime-canvas-support/js/display.js
    wp-content/themes/buffdayspa/js/jquery.mobilemenu.js
    wp-content/themes/buffdayspa/js/main.js
    wp-content/themes/buffdayspa/js/jquery.cycle.lite.js
    wp-content/themes/buffdayspa/js/jquery.textfill.min.js
    wp-includes/js/admin-bar.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/chosen/chosen.jquery.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/chosen-frontend.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/country-select.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/address-i18n.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/checkout.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js
    /redacted.domain.com/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js

    Seems to be putting the domain name into the list of js and css files (redacted.domain.com replaces client domain).

    I get the same results with Debugging on (combine but not minify).

    Tried excluding the files above using the interface but it did nothing.

    Wil.

    https://wordpress.org/plugins/wp-minify/

  2. jimboobrien
    Member
    Posted 1 year ago #

    I have the same problem. I want to use "Better WordPress Minify", but when I activate "Woocommerce" it breaks the minification plugin.

    I can get the minify to work without "Woocommerce", but as soon as woo is activated the minification DOES NOT WORK.

    I have troubleshot this for days now, and found that even if I try and specify not to use the minification on the three woocommerce "handles" that it still has issues with minifying.

    Please advise on how we can move forward on fixing this. This is a community issue for "Woocommerce"!

    - Jim

  3. Davidok95
    Member
    Posted 7 months ago #

    You can fix this by adding this line:
    $url = preg_replace('/^\/\/[^\/]+/', '', $url);
    after:
    $url = str_replace($site_url, '', $url); // relative paths only for local urls
    In function: local_version
    In /wp-content/plugins/wp-minify/wp-minify.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Minify
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.