Support » Plugin: Autoptimize » Blank page on just one page, no source, using Autoptimize HTML

  • Resolved HikingMike

    (@hikingmike)



    I just noticed one page on our site was not displaying – the animated circle would just keep going for a while, Firefox status bar at the bottom said “Waiting for datarecovery.com…” and eventually it would stop with just a blank page and there was no source HTML.

    When I disabled the “Optimize HTML Code?” checkbox, then it worked. It must have been like this since I installed Autoptimize, but I just didn’t notice it since it was maybe the only page like it until I saw the error in Google Webmaster Tools (detected 2 days ago).

    Now I also have W3 Total Cache. I have Minify enabled on the general settings screen, but on the Minify settings screen, Minify for HTML & XML was disabled to hopefully not conflict with Autoptimize. (I still use Minify in W3 Total Cache for JS.)

    I tested keeping “Optimize HTML Code?” disabled in Autoptimize, and then enabling Minify for HTML & XML in W3 Total Cache, but I had the exact same issue then.

    So it seems I have to keep the optimization/minify disabled on both W3 Total Cache and Autoptimize for this one particular page to work. This page is the archive page of a custom post type, with some extra content at the top if that matters.

    The page is here – http://datarecovery.com/testimonials/

    Any help is appreciated! I realize this could still be a conflict with the two somehow, despite having HTML minify/optimization enabled for only one of these two plugins at a time.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frank Goossens

    (@futtta)

    hiya mike;
    first of all 3 questions;
    1. any difference when you keep HTML comments?
    2. there are over 1000 blank lines in the HTML source, not sure that this is the root cause, but any way to remove those?
    2. anything in your phperror.log file?

    a workaround: you can use the API (the “autoptimize_filter_noptimize”-filter) to disable autoptimization (which in your case would be HTML and CSS) of a specific page. there’s example code in autoptimize_helper.php_example

    frank

    Thanks for the quick reply! I’ll do some work to answer these and get back!

    1. No, still doesn’t work when “Keep HTML comments?” is checked.

    2. Wow yes that is a bit annoying. The PHP used in the theme template for that page has conditionals within loops, and even if the conditional fails there are extra lines output since the syntax used was if($value[1]): and endif; which were all within their own PHP tags for readability I guess. I reworked it to just use the normal syntax where it wouldn’t have to switch in and out of PHP tags like crazy. Corrected.

    Sweet, now the page works even with Autoptimize enabled for HTML (and no comments)! Too many blank lines must have been the cause. Fantastic.

    3. I found my apache error.log.52.gz that has PHP errors, but none related to this (searched by the php file name and variants).

    Thanks, Frank!

    Plugin Author Frank Goossens

    (@futtta)

    Sweet, now the page works even with Autoptimize enabled for HTML (and no comments)! Too many blank lines must have been the cause. Fantastic.

    great, happy it works for you!

    have fun,
    frank

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blank page on just one page, no source, using Autoptimize HTML’ is closed to new replies.