I don`t know exactly when but it seems to me after upgrade of some modules and core, sitemap stopped working. Using latest Drupal 7.17 and XML Sitemap 7.x-2.0-rc1

You can see it with some kind of error here http://www.testtest.detect.by/sitemap.xml (Use Firefox to get it displayed)

How could i know what`s the problem?

Thanks in advance!

  • check this post bytechip.com/2010/05/xml-parsing-error , it tells changes in .htaccess file may cause this Nov 29, 2012 at 8:53
  • I am having Cache Booster (which has some settings in .htaccess) enabled but the sitemap later worked properly with and .htaccess did not changed. Nov 29, 2012 at 9:46

2 Answers 2


Your sitemap seems to work. When viewing the source of your sitemap, the XML needed for crawlers is displayed.

If you're talking about the blank page you get to see when viewing it in your browser: see if you've enabled the "include stylesheet for humans" option in the configuration of the module.

  • It worked for a year (stylesheet is enabled). Then suddenly an error (you can see it in firefox) Nov 29, 2012 at 8:44
  • You can validate your Sitemap to check for any errors. Looks like stylesheet is misssing but XML generated is valid.
    – GoodSp33d
    Nov 29, 2012 at 11:50

The error Firefox shows is for the sitemap.xsl file.

XML Parsing Error: not well-formed
Location: http://www.testtest.detect.by/sitemap.xsl
Line Number 1, Column 2:
<?xml version="1.0" encoding="UTF-8"?>

I tried validating the file with the Nu Markup Validation Service, and it shown the following error:

Fatal Error: required character (found ) (expected <)
At line 1, column 2

<?xml version=

The problem is caused by a space before <?xml version="1.0" encoding="UTF-8"?>.

The first lines of sitemap.xsl are the following ones.

 <?xml version="1.0" encoding="UTF-8"?>

<!-- Copyright (c) 2010  Dave Reid <http://drupal.org/user/53892>

     This file is free software: you may copy, redistribute and/or modify it
     under the terms of the GNU General Public License as published by the
     Free Software Foundation, either version 2 of the License, or (at your
     option) any later version.

     This file is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.

     This file incorporates work covered by the following copyright and
     permission notice:

     Google Sitmaps Stylesheets (GSStylesheets)
     Project Home: http://sourceforge.net/projects/gstoolbox
     Copyright (c) 2005 Baccou Bonneville SARL (http://www.baccoubonneville.com)
     License http://www.gnu.org/copyleft/lesser.html GNU/LGPL -->

That space is not present in the file that is used to create the output for http://www.testtest.detect.by/sitemap.xsl, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.