• we are using the lastest version of your plugin on our site at https://neuwal.com/sitemapindex.xml – regardless of the browser we are getting the following error:

    This page contains the following errors:
    error on line 4 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    Can you please tell us how this can be fixed?

    Another question: we would like to (automatically) add custom items to the sitemap as this is possible with the “Google XML Sitemaps” plugin, which we are using on another site. With that plugin, we can add sitemap entries by using the class GoogleSiteMapGenerator and calling the function ->AddUrl(). Does your plugin also offer a similar API? Couldnt find any documentation on your site…
    thanks!
    Robert

    https://wordpress.org/plugins/bwp-google-xml-sitemaps/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Khang Minh

    (@oddoneout)

    Hi Robert,

    If you view the source code of your sitemapindex.xml you will notice there are three blank lines before the declaration of the <xml> tag. Something else is probably adding them to the sitemap.

    Also I notice that you’re using W3TC, so first try excluding the sitemap from W3TC, by following this guide: http://betterwp.net/wordpress-plugins/google-xml-sitemaps/faq/#not-found-error

    If that doesn’t help, you will have to disable plugins one by one to know which one is the culprit, it can even be the current theme you’re using.

    Regarding adding custom items to the sitemap, what sitemaps do you want to add items to?

    thanks! I will give that a try later and let you know the results.

    regarding custom items for sitemap: this question is not related to neuwal.com but to my mapping plugin Maps Marker Pro. With v2.6 I added support for Google XML sitemaps, so that links to KML sitemaps are automatically added to the sitemap – see https://mapsmarker.com/v2.6p for more details. As I am currently planning the next releases I thought it would be great if I could also support other popuplar sitemap plugins in a similar way….

    Plugin Author Khang Minh

    (@oddoneout)

    Yeah I believe you contacted me about this some time ago. Anyway, if you can show me actual code changes in 2.6 to provide support the Google XML Sitemaps plugin, I will see what I can do. Best to have the codes on github or somewhere else where I can easily see the diffs.

    Hi,

    regarding Maps Marker Pro integration: with v2.7, I used the following code to my plugin to support adding links to KML to the sitemap – see gist at https://gist.github.com/robertharm/5cd1b9367d403e0584fd

    regarding intial question about additional lines: the reason was incorrect code in functions.php, solved now – thanks!
    best,

    Robert

    Plugin Author Khang Minh

    (@oddoneout)

    Hi,

    Do you have a sample sitemap with KML links added so I can take a look at the actual output?

    Thanks.

    yes of course – have a look at https://www.mapsmarker.com/sitemap-misc.xml which is the actual output….

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘XML error when trying to access sitemapindex.xml’ is closed to new replies.