New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reached end of document without finding <body> is an error, should be a warning or less #134

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 5 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

What steps will reproduce the problem?

Generally, serve up an HTML output with no <body> tag in it

In my case: 

1. Run wordpress with wp-greetbox plugin
2. Notice the above error in the logs

What is the expected output? What do you see instead?

I didn't want to see these errors in the logs.

What version of the product are you using (please check X-Mod-Pagespeed
header)?

0.9.10.1-250

On what operating system?

CentOS

Which version of Apache?

Apache/2.2.9 (Unix)

Which MPM?

prefork

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.

mod_pagespeed reports HTML fragments with no <body> tag as an error, when in 
fact these are not really worth the attention of the server administrator.

For example, this WordPress plugin "WP-Greetbox" appears to be fetching the 
HTML fragment using AJAX and inserting it into the page, and in this case a 
body tag would be extraneous.

There are various other AJAX use cases for non-well-formatted HTML; for 
example, if you want to get plain text back in a POST response in an iframe 
I've found I have to send it as text/html otherwise browsers might wrap it in a 
<pre> tag or other wonderful transformations.  Sending the plain text with the 
wrong content type results in an innerHTML with just the right contents.


Original issue reported on code.google.com by dobes.va...@kashoo.com on 6 Dec 2010 at 6:45

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Also seeing this when loading the WordPress Dashboard, its AJAX responses also 
do not comtain a <body> tag it seems: 

[Sun Dec 05 22:45:49 2010] [error] [mod_pagespeed 0.9.10.1-250] 
http://www.xxxxxxx.com/blog/wp-admin/index-extra.php?jax=dashboard_incoming_link
s:1: Reached end of document without finding <body>

Original comment by dobes.va...@kashoo.com on 6 Dec 2010 at 6:47

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Fair enough.  Out of curiousity, is this an error page?  Or is WordPress 
generally not annotating its generated HTML with body tags?

Original comment by jmara...@google.com on 6 Dec 2010 at 3:17

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

It's an HTML fragment:

{{{
<div class="greet_block"><div class="greet_text"><div class="greet_image"><a 
href="http://www.clarityaccounting.com/blog/index.php/feed/rss/" rel="nofollow" 
onclick="pageTracker._trackPageview('/outgoing/www.clarityaccounting.com/blog/in
dex.php/feed/rss/?referer=');"><img 
src="http://www.clarityaccounting.com/blog/wp-content/plugins/wp-greet-box/image
s/google_icon.png" alt="WP Greet Box icon"/></a></div><div 
class="greet_block_close"><a id="greet_block_close" href="#">X</a></div>Welcome 
<strong>Googler</strong>! If you find this page useful, you might want to <a 
href="http://www.clarityaccounting.com/blog/index.php/feed/rss/" rel="nofollow" 
onclick="pageTracker._trackPageview('/outgoing/www.clarityaccounting.com/blog/in
dex.php/feed/rss/?referer=');"><strong>subscribe to the RSS feed</strong></a> 
for updates on this topic.<div style="clear:both"></div><div 
class="greet_block_powered_by">Powered by <a 
href="http://omninoggin.com/projects/wordpress-plugins/wp-greet-box-wordpress-pl
ugin/" title="WP Greet Box WordPress Plugin" 
onclick="pageTracker._trackPageview('/outgoing/omninoggin.com/projects/wordpress
-plugins/wp-greet-box-wordpress-plugin/?referer=');">WP Greet Box</a> <a 
href="http://omninoggin.com/" title="WordPress Plugin" 
onclick="pageTracker._trackPageview('/outgoing/omninoggin.com/?referer=');">Word
Press Plugin</a></div></div></div><div style="clear:both"></div>
}}}

Original comment by dobes.va...@kashoo.com on 6 Dec 2010 at 5:23

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Fixed in revision 294. Thank you for your report.

Original comment by morlov...@google.com on 6 Dec 2010 at 10:42

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by sligocki@google.com on 6 Dec 2010 at 10:43

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment