My site sends the sitemap to Google in two files. The second one is reported OK, for the first one Google reports an error on line 4. This line has the following content:

<url><loc>http:[DOMAINNAME]/de</loc><changefreq>daily</changefreq><priority>1.0</priority></url>

has it to do with the language indicator appended to the domain name?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

We need the value of [DOMAINNAME] to help you with this problem.

schildi’s picture

Well, the domain name is

archiv.bgv-rhein-berg.de

I hope this helps

Anonymous’s picture

Line 4 contains <url><loc>http://archiv.bgv-rhein-berg.de/de</loc><changefreq>daily</changefreq><priority>1.0</priority></url> which you stated already.

I don't know why Google would have an issue with one file and not the other. The message you have pictured appears to state that you've not configured http://archiv.bgv-rhein-berg.de/de as a site url.

schildi’s picture

as far as I know the trailing "/de" ( or "/en", "/fr") is appended by the i18n (internationalisation) module. It is NOT a part of the domain name.
The domain name is still "archiv.bgv-rhein-berg.de"

Anonymous’s picture

Yes, but Google is expecting site/sitemap.xml and not site/de/sitemap.xml unless you give site/de as a host.

Or maybe it expects the first URL presented to be site and not site/de unless you give site/de as a host in your Google account.

Either way, presenting to Google that site/de is the host that you want to submit the sitemap.xml file for should resolve your issue.

schildi’s picture

FileSize
25.53 KB

then please tell me where to adjust this setting for xml-sitemap. Currently I have the settings in
/admin/settings/xmlsitemap/settings
as can be seen in the attached image.

Anonymous’s picture

There isn't one in xmlsitemap, go to your Google administration screen and enter the site/de URL as a site (or as the site) you own and submit the sitemap.xml in that sites admin screen. You've set your front page (or that happens because of your base language) to site/de so xmlsitemap will not create a link to site because the Drupal API will not return it.

schildi’s picture

FileSize
59.9 KB
32.94 KB

I really like to understand what is going wrong. Fact is that the domain name doesn't end in "/de", "/en" or whatever language indicator. In

/admin/settings/xmlsitemap

I can set the language for the sitemap (compare attached image). But this setting seems to interfere with settings made in

/admin/settings/language/configure (see second attached image)

All paths are even valid if no path prefix / language indicator is used at all. But there is no choice for enabling "no language" in menu /admin/settings/xmlsitemap.

P.S.
Everything looks fine when I open an editor and delete the "/de" from the one line in question.
But I don't want to do this on every update of the site.

Anonymous’s picture

You'll have to ask Google support what is invalid about that line. I don't see anything wrong.

ywarnier’s picture

I hav the same problem with the attached sitemap.xml.
No idea why, and the Google Webmaster tools error is not helpful at all. I have a similar page on another site without the daily
1.0 part and with a item for each .
I'm using xmlsitemap 7.x-2.0-rc1.

Testing around, I realized that Google accepts the sitemap if it doesn't have the elements mentioned above.

Because I needed this to work in a hurry but I'm not so fluent in Drupal patching, I've made the following change to xmlsitemap.xmlsitemap.inc, around line 124 (in function writeElement()):

  $this->startElement($name);
+ $exclude = array('changefreq', 'priority');
  foreach ($content as $sub_name => $sub_content) {
+ if (in_array($sub_name, $exclude)) { continue; }
    $this->writeElement($sub_name, $sub_contnt);
  }

Obviously, this is a very ugly patch (we should just *not add* the changefreq and priority elements to the $content array in the first place), but there should be some mechanism to make it "Google Webmaster tools compatible" somewhere in the module's config.