Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter carlosmaq

    (@carlosmaq)

    The problem is with

    ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js,ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js,ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js,

    I have tried to exclude these urls but nothing happens

    any idea to exclude these urls?

    It seems this problem occurs when you put wordpress in a subfolder.

    In bwp-minify\min\config.php, there is a configuration variable named $min_documentRoot set to ” (empty string) which means “take the value from $_SERVER[‘DOCUMENT_ROOT’]”.

    But $_SERVER[‘DOCUMENT_ROOT’] is not the wordpress root folder if it is installed in a subfolder.

    to fix it, replace
    $min_documentRoot = ”;
    by
    $min_documentRoot = realpath(dirname(__FILE__).’/../../../../’);

    That should work in any cases.

    Thread Starter carlosmaq

    (@carlosmaq)

    Thanks for the info but when I change that variable the result is the same.

    Also I have manually writed the documnet root and the same:

    <script type=’text/javascript’ src=’http://inglaterraencasa.com/wordpress/wp-content/plugins/bwp-minify/min/?f=ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js,ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js,ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js,

    The first lines of javascript minified include the external files.

    P.S.: I have deleted the cache

    Plugin Author Khang Minh

    (@oddoneout)

    Thanks for reporting, this bug will be fixed in 1.2.4.

    Experiencing this as well and can’t seem to find any trace of the error in php nor nginx logs. Would love even the most remote hint at solving this.

    Also, my f= paths to css are a mix of absolute URLs and relative paths. Assuming this is normal.

    My wordpress is in a subdirectory as a git submodule. This is how 100% of our wordpress sites are done as of a couple years ago.

    Any feedback would be wonderful.

    Also, LOTS of warnings about $cpn_path being undefined on line 617 of class-bwp-minify.php.

    Okay, if you actually want to see the errors without loading the firebug php log thing just add this to your config:

    class MinifyLogger {
    	public function log($error) {
    		echo '<p>' . $error . '</p>';
    	}
    }
    $min_errorLogger = new MinifyLogger();

    in place of
    $min_errorLogger = false;

    Now I can see that the full urls are being passed to minify even though they are local files. I believe this has something to do with wordpress being in a subdirectory along side wp-content (as one would do if they were using wordpress as a git submodule). I will keep debugging and post my findings.

    I was able to solve this by modifying wordpress config’s WP_CONTENT_URL.

    I changed it from

    define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content');

    to

    define('WP_CONTENT_URL', '/wp-content');

    I think when using realpath() I also usually subtract the url scheme and HTTP_HOST from the value before input.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘error 400 bad request’ is closed to new replies.