You are here:  » Sitemap Error Message

Active Forum Topics


Sitemap Error Message

Submitted by bat on Thu, 2021-03-18 00:15 in

Hi David,
Just come across this problem with my sitemap

"error on line 1 at column 7: XML declaration allowed only at the start of the document"

I don't know how long it's been an issue.
I read that it might be to do with white space but I've not touched my sitemap so nothing should have gone awry, and after taking a look at the file, nothing looks any different or wrong.

{link saved}

Submitted by support on Thu, 2021-03-18 07:53

Hi,

Yes - it is a white space issue - almost certainly crept in at the top of config.php or config.advanced.php accidentally whilst editing. Edit both files and make sure there is no space or new lines outside of the PHP tags, upload back to the server and that should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Thu, 2021-03-18 11:30

Hi David,
Could anywhere else be to blame? I've checked those two files and they look fine. I've reuploaded them but still same issue exists.

Submitted by support on Thu, 2021-03-18 12:05

Hi,

It could be any of the includes/ files that you may have edited, but also check sitemap.php itself - all files should begin:

<?php

...and end:

?>

- nothing outside, even new-line...

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Thu, 2021-03-18 12:34

Found it in one of the includes! Thanks for your help.