WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
[resolved] 1.8.2 breaks css and js (19 posts)

  1. Praveen Kumar
    Member
    Posted 5 months ago #

    Letting you know that after I upgraded to the latest version the css/js seems to have been messed up pretty badly.

    The JS (esp jquery) is not loading even though i have added jquery.js in the ignore list.

    And the CSS is also messed up rendering my site without any style.

    I cleared the Autoptimize cache, cdn cache and wp super cache.. no effect.

    So for now i am going back to 1.8.1.

    https://wordpress.org/plugins/autoptimize/

  2. Praveen Kumar
    Member
    Posted 5 months ago #

    If it is of any help, these are the error logs after upgrading to 1.8.2

    [25-Mar-2014 05:33:00 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:00 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:00 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:10 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:19 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:19 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:20 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:35 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:35 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:37 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:37 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:37 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:38 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:41 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:41 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:42 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:42 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:43 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:44 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:53 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:54 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 05:33:54 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:33:54 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 05:34:06 UTC] PHP Fatal error: Call to undefined method autoptimizeScripts::hide_comments() in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 57
    [25-Mar-2014 05:34:06 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
    [25-Mar-2014 05:35:14 UTC] PHP Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/autoptimize.php on line 66

  3. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    thanks, looking into it!

  4. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    weird. what version of PHP are you running Praveen?

  5. Praveen Kumar
    Member
    Posted 5 months ago #

    PHP Version: 5.3.13

    Never had these type of errors with 1.8.1. These started showing up only after upgrade to 1.8.2

  6. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    forgetting about the "Missing argument 1"-ones (I'd have to solve that but those are not blocking), but those I esp. don't understand are;

    [25-Mar-2014 05:34:06 UTC] PHP Fatal error: Call to undefined method autoptimizeScripts::hide_comments() in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 57

    I double-checked and that method is most certainly there (in autoptimizeBase.php).

    [25-Mar-2014 05:35:14 UTC] PHP Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /xxx/xxxx/public_html/wp-content/plugins/autoptimize/autoptimize.php on line 66

    the amount of changes in autoptmize.php is almost nothing and I'm pretty sure nothing's wrong in there.

    So I feel something went terribly wrong when upgrading 1.8.2. Could you try again?

  7. Praveen Kumar
    Member
    Posted 5 months ago #

    No luck.. After i posted the last reply (php version) i upgraded to 1.8.2

    Just before upgrading i deleted the error log and upgraded.

    At the time of this post, the log is abt 1mb and is full of errors like below

    25-Mar-2014 07:01:49 UTC] PHP Warning: Missing argument 1 for JSMin::__construct(), called in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php on line 170 and defined in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 90
    [25-Mar-2014 07:01:50 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 07:01:51 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69
    [25-Mar-2014 07:01:52 UTC] PHP Warning: Missing argument 1 for Minify_HTML::__construct(), called in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php on line 29 and defined in /xxx/xxx/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-html.php on line 69

  8. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    Ok, but these aren't blocking errors, but mere warnings which I'll look into. are the other fatal errors gone? The ones I mentioned in the previous reply?

  9. Praveen Kumar
    Member
    Posted 5 months ago #

    Yes, the errors are not showing up but the log is filling up with these warnings. Right now its about 1.5mb

  10. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    ok, but that we'll solve in a minute. can you now first check if your blog is OK? is Autoptimize doing what it should, or is your site still messed up?

  11. Praveen Kumar
    Member
    Posted 5 months ago #

    Sorry, forgot to mention that.

    Blog is fine and Autoptimize is good.

  12. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    that's a relief :-)

    regarding the error messages; could you apply the following minor changes;

    autoptimizeHTML.php

    29c29
    <                       if (is_callable(array(new Minify_HTML,"minify"))) {
    ---
    >                       if (@is_callable(array(new Minify_HTML,"minify"))) {

    autoptimizeScripts.php

    170c170
    <                       if (is_callable(array(new JSMin,"minify"))) {
    ---
    >                       if (@is_callable(array(new JSMin,"minify"))) {

    autoptimizeStyles.php

    281c281
    <                               } elseif (is_callable(array($cssmin,"minify"))) {
    ---
    >                               } elseif (@is_callable(array($cssmin,"minify"))) {

    basically what you're doing is prepending the is_callable method with an @ to suppress the warnings that are flooding your error-log.

  13. Praveen Kumar
    Member
    Posted 5 months ago #

    Great :). That did the trick.
    Its been about 2 mins and no errors being generated.
    Will check after a couple of hours and will report. If all is well, will mark it as resolved.

    Thanks a lot :)

  14. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    no, thank you for the feedback! sorry for spamming your php-error-log. I'll push out 1.8.3 with the warning-supression on is_callable later today.

  15. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    did you have time to recheck your error log Praveen? looks ok?

  16. Praveen Kumar
    Member
    Posted 5 months ago #

    I just did and all seems good. no more errors.

  17. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    happy happy joy joy! thanks for the help!

  18. scruffy1
    Member
    Posted 5 months ago #

    quick question , suppressing the warning won't fix the underlying issue, do you know what the issue could be ? as we had a mass of errors too

    thanks

  19. Frank Goossens
    Member
    Plugin Author

    Posted 5 months ago #

    normally I would say you're right. in this case though, I'm using the "is_callable" php function to see if I can indeed call the minifying functions. is_callable tries to invoke the function without arguments and return true if it can. any error resulting from the check (in this case; no arguments) is irrelevant. if is_callable returns true, the actual call will be made with the correct arguments.

    hope this makes sense :)
    frank

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.