Hello,
For SEO purposes we utilize an xmlsitemap module to generate sitemap.xml file for the entire site. After enabliing and building the sitemap file, when we view it we see the following error :
XML Parsing Error: XML or text declaration not at start of entity
Location: http://www.domain.com/sitemap.xsl
Line Number 1, Column 3: <?xml>--^
This error is generated because a space is being generated at the head of all content. See references here :
https://www.drupal.org/node/1447898
https://www.drupal.org/node/1308632
https://www.drupal.org/node/1452858
After disabling the module "simplr_page_builder" , the problem went away. Something in the code there is causing this to happen. I ran a script to check for spaces at the head and tail of all files in the module, but I think the content is being dynamically generated causing the error (i.e. a php output that adds a space to the head).
Can you give direction as to where in the module this might be happening?
I fixed the problem. There was 3 extra spaces before "<?php" in the file :
/sites/all/modules/simplr_page_builder/plugins/phoenix/custom_phoenix_skill/spb_custom_phoenix_skill.module
So before :
<?php
/**
* @file: spb_custom_phoenix_skill.module
* @author: MegaDrupal
*/
/**
* implements hook_menu()
*/
And after :
<?php
/**
* @file: spb_custom_phoenix_skill.module
* @author: MegaDrupal
*/
/**
* implements hook_menu()
*/
Those 3 spaces caused XML generation to fail for the entire site - please fix this bug.
Hi,
Great! Thank you very much for your feedback and contribution. Should you have any ideas and suggestion, feel free to tell us. Innovative and creative thinkings are always welcome.
Really appreciated!
Many thanks,