Seems like not working...
pbt39ppc opened this issue · comments
after installing, on the onelang non en site i see:
http://mysite.name/sitemap
This page contains the following errors:
error on line 1 at column 8: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
and there is nothing below...
removing 1st line in the sitemap.xml.twig
fixed the issue (but i think that is too rough), google fing no errors in the sitemap.
Do you have an empty line/space at the beginning of the sitemap?
now, yes.
but without that empty linw works too.
Hi I got the same error ... after deleting the first line of sitemap.xml.twig (with and without a blanc line) everything works fine now ....
Where is this file coming from that has the blank line? The one in the plugin has no blank line. https://github.com/getgrav/grav-plugin-sitemap/blob/develop/templates/sitemap.xml.twig
This is workaround.
- delete all in the first line, the line itself still there, so it's blank.
or - delete all line, so the 2nd line became 1st.
Yes I agree with pbt39ppc ... both solution are working. This is what I meant by saying:
with and without a blanc line
Of course in the original file there is no blank line
Can one of you send me (also privately on Slack) your user/
folder to test? Because I cannot get that white space to show up in the first line.
@pbt39ppc sent me the site to check. The problem was caused by the (custom) theme having two white spaces after the closing PHP tag. Those 2 spaces appeared before the twig template rendering, so they caused the issue.