Module

Developer
Supported

Sitemap Module

ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

Diagnostics (Output Profiler, Template Debugging, etc) cause XML parse errors in sitemap.xml

General

BBG
BBG

I don’t know if this is a bug, but it seems like it could be problematic on a production server. After installing on EE 2.6.1 and building our sitemap template, I kept getting XML parse errors like

XML Parsing Error: junk after document element
Location: http://dev.mysite.com/site/sitemap
Line Number 13, Column 51:<!—Generated by the EE Sitemap Module v2.6.2—><div id=‘codeigniter_profiler’ style=‘clear:both;background-color:#fff;padding:10px;’>
—————————————————————————^

Another:

XML Parsing Error: junk after document element
Location: http://dev.mysite.com/site/sitemap
Line Number 2, Column 1:Parse error:  syntax error, unexpected T_STRING in /usr/www/dev/system/expressionengine/libraries/Functions.php(679) : eval()‘d code on line 1
<div id=‘codeigniter_profiler’ style=‘clear:both;background-color:#fff;padding:10px;’>
^

Anyway, I turned off Output Profiler and Template Debugging and it fixed it. Unfortunately this would mean if we need to turn on diagnostics on a production server, our XML sitemap would be broken. Any thoughts? I’m designating this as a bug, but perhaps something’s wrong on our end?

BBG
# 1
BBG

Sorry, I already see that this is because I’m logged in as a Super Admin when viewing the XML. Resolved!

thanks