WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
[resolved] Feed Issue (22 posts)

  1. Dinata
    Member
    Posted 10 months ago #

    I use your plugin with hypercache and everything works fine, but when I enable the css optimization option, apparently my feed become invalid as seen in this screenshot.

    It looks like a blank space on the 1st line that caused it become invalid. So, I need some advice to fix the blank space issue on my feed?

    http://wordpress.org/extend/plugins/autoptimize/

  2. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    Very weird, I'll look into that Dinata.

  3. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    I can't reproduce on my testblog, which makes things slightly more complicated.

    Can you open up /wp-content/plugins/autoptimize/autoptimize.php and on line 50 replace

    // if (!is_user_logged_in()) {
    with
    if (!is_feed()) {

    and on line 93 replace
    // }
    with
    }

    This should stop any interference of Autoptimize with your feed?

  4. Dinata
    Member
    Posted 10 months ago #

    Thank you for your quick feedback support. After I made some changes in autoptimize.php file as you suggest, the feed issue gone and my feed back to be valid now.

    Once again, Thanks Futtta.

  5. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    You're welcome. I'll look into this some more for the next release and will probably include this fix in it.

  6. talgalili
    Member
    Posted 10 months ago #

    Hello Dear Futtta,

    1) I LOVE your plugin.
    2) I've just discovered I also have a similar issue (your plugin breaks my feed).
    I suspect this is the same problem already reported here:
    http://wordpress.org/support/topic/plugin-autoptimize-rss-feed-breaks?replies=1

    I have turned the plugin off in the meanwhile, but I'm looking forward to turning it back on once you update to include this fix.

    Thanks,
    Tal

  7. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    Interesting you're encountering the same problem Talgalili. You should be able to continue to use Autoptimize if you turn CSS-optimization off.

    But as you're such a big fan, I might push out a small update (for this and another small bug) soon just to thank you for your feedback :-)

    I'll ping you guys here as soon as the update is out.

  8. talgalili
    Member
    Posted 10 months ago #

    Thanks Futtta,

    That would be greatly appreciated :)

    With regards,
    Al

  9. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    I just pushed out 1.6.4 with this fix in it guys. Hope you like it :-)

  10. talgalili
    Member
    Posted 10 months ago #

    HI Futta,
    Thank you for the fix!

    Sadly, this does seem to fix the problem for the feeds, however, whenever I turn your plugin on, my homepage has a white screen of death.
    My site is:
    r-bloggers.com

    Any idea on what might be causing it?

    Thanks!

  11. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    that is _very_ weird, there are 3 very small fixes in there, none of which should cause any breakage. do you see anything in your php error log that could help?

    on a side-note; I sometimes suffer from wsod's as well, believed to be caused by a combination of wp super cache & apc. restarting apache solves that, I even have a script that is cronned to check & restart if needed every 10 minutes.

  12. talgalili
    Member
    Posted 10 months ago #

    Hi Futta,
    My r-bloggers.com is loading fine
    Could you please try again or post what your ip is?
    (you can also e-mail it to me tal.galili@gmail.com)

    10x

  13. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    It is, I had already updated my reply (cfr. above);

    very weird, there are only 3 very small fixes in there, none of which should cause any breakage. do you see anything in your php error log that could help?

    on a side-note; I sometimes suffer from wsod's as well, believed to be caused by a combination of wp super cache & apc. restarting apache solves that, I even have a script that is cronned to check & restart if needed every 10 minutes.

  14. talgalili
    Member
    Posted 10 months ago #

    Hi Futtta,

    I've looked at -
    http://wordpress.org/plugins/wp-super-cache/faq/

    And there it says it is either caused by APC or a php error somewhere.

    Question: is there any chance you'd be able to implement into your plugin the ability to selectively have autoptimize NOT run for some types of pages (such as calls for is_home(), and others). In a similar way as wp-super-cache allows selective deactivation of the caching.

    This way I'd be able to more easily debug this, and people in the future would be able to turn your great features off in specific types of pages.

    What do you think?

    Cheers,
    Tal

  15. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    I would be surprised to have introduced a PHP error with 1.6.4 (I run it in WordPress debug mode to output all errors, warnings and notices and see nothing), but if any they should show up on your php error log?

    I'm working on an API for my other plugin (WP YouTube Lyte), allowing to override default behavior and will probably add something similar to Autoptimize in the future. That future API could allow altering the default behavior as you describe.

    To debug this;

    • can you confirm you did not have this issue with 1.6.3, or wasn't 1.6.3 active due to the feed-issue?
    • can you try if restarting apache changes anything (re my occasional wsod's)?
    • can you deactivate all 3 types of Autoptimization (JS, CSS & HTML) and then selectively re-activate them to see when the problem starts occurring?
  16. talgalili
    Member
    Posted 10 months ago #

    Hi Futtta:

    1) I did NOT have this issue with 1.6.3
    2) Sorry, but I don't have access to restarting the server, I'd have to ask the admins (and I'm trying to avoid it if possible)
    3) Just did. It seems that the HTML is the one causing it. Once I deactivated it, and left the rest working - the problem was resolved. (turning it back on, returned the problem)

    What do you think?

    Tal

  17. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    Well, I think that is weird :-)

    This is the diff between autoptimizeHTML.php in 1.6.3 and 1.6.4;

    futtta tags # diff 1.6.3/classes/autoptimizeHTML.php 1.6.4/classes/autoptimizeHTML.php
    35c35
    < 			if ($restore_mfuncs) {
    ---
    > 			if (isset($restore_mfuncs)) {

    can you open the file and change it back to what it was in 1.6.3 to see if that solves anything (which would surprise me, really)?

  18. talgalili
    Member
    Posted 10 months ago #

    Weird.
    I've edited the file as you suggested, turned HTML on, and it still gave me the WSOD.

    ???

  19. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    well, this is the full diff (excluding readme.txt);

    diff -x '*svn*' -x readme.txt -r 1.6.3/autoptimize.php 1.6.4/autoptimize.php
    6c6
    < Version: 1.6.3
    ---
    > Version: 1.6.4
    29d28
    < // update_option('autoptimize_version','none');
    31c30
    < $autoptimize_version="1.6.3";
    ---
    > $autoptimize_version="1.6.4";
    50c49
    < 	// if (!is_user_logged_in()) {
    ---
    > 	if (!is_feed()) {
    93c92
    < 	// }
    ---
    > 	}
    diff -x '*svn*' -x readme.txt -r 1.6.3/classes/autoptimizeHTML.php 1.6.4/classes/autoptimizeHTML.php
    35c35
    < 			if ($restore_mfuncs) {
    ---
    > 			if (isset($restore_mfuncs)) {
    diff -x '*svn*' -x readme.txt -r 1.6.3/classes/autoptimizeScripts.php 1.6.4/classes/autoptimizeScripts.php
    30c30
    < 			$exclJSArr = array_map('trim',explode(",",$excludeJS));
    ---
    > 			$exclJSArr = array_filter(array_map('trim',explode(",",$excludeJS)));

    As I wrote, nothing spectacular in there, very surprised about your wsod as well.

    What you could do (I would if I could reproduce the problem, but I can't), as last resort, is restore the isset-thing in autoptimizeHTML.php and revert the other 2 changes from the diff above one after the other to see if you can isolate the culprit that way?

  20. futtta
    Member
    Plugin Author

    Posted 10 months ago #

    any luck trying to isolate the problem tal?

  21. talgalili
    Member
    Posted 10 months ago #

    Hi Futtta,

    I couldn't reproduce the problem with my other blogs.
    And I didn't get to play around with this one.
    I will give this another week (since my server often crashes on its own once in a while, so that will give the restart). If the server will stay live, I'll have a go with debugging it and let you know (sorry for not giving more info, I'm shorter on time this week).

    Yours,
    Tal

  22. futtta
    Member
    Plugin Author

    Posted 4 months ago #

    update regarding:

    any chance you'd be able to implement into your plugin the ability to selectively have autoptimize NOT run for some types of pages (such as calls for is_home(), and others)

    I've started work on 1.8, which will include a filter that can be used to disable autoptimze on a page. more soon.

Reply

You must log in to post.

About this Plugin

About this Topic