Problem:
If you have the securepages module installed, and have /admin set to be "protected" so that all pages within it are accessed by a URL beginning "https://" , then you'll get the error:
Error occurred submitting site map to Windows Live: 400
This is because the URL for the sitemap is saved as https://your_site/sitemap.xml and Windows Live can't cope with HTTPS sitemaps.
Workaround:
A workaround for those affected is to do the following.
In file: "modules/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module"
In function: "_xmlsitemap_engines_live($op)"
I changed:
$result = drupal_http_request(variable_get('xmlsitemap_engines_live_url', 'http://webmaster.live.com/ping.aspx?siteMap='. xmlsitemap_url('sitemap.xml', drupal_l
ookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
To:
// Securepages kills this - Dewi.
# $result = drupal_http_request(variable_get('xmlsitemap_engines_live_url', 'http://webmaster.live.com/ping.aspx?siteMap='. xmlsitemap_url('sitemap.xml', drupal_l
ookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
$result = variable_get('xmlsitemap_engines_live_url', 'http://webmaster.live.com/ping.aspx?siteMap='. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 's
itemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE));
$result = preg_replace('!https://!', 'http://', $result);
$result = drupal_http_request($result);
This resolves the problem, but is suboptimal. I also did the same for the other engines, since although they can *cope* with https:// URLs, they shouldn't have to, it's pointless load on their servers and mine.
Feature Request:
Never store HTTPS URLs for submission: always convert to HTTP before writing to the database.
While the above workaround works, it should be fixed earlier in the chain: the URL should never be stored as HTTPS in the first place. There's no reason to ever have a HTTPS sitemap, because the information isn't secured anyway.
Comments
Comment #1
darren ohYou can always go to the search engines tab on the XML Sitemap settings page and change the submission URL.
Comment #2
avpadernoI am changing the status to fixed to make the report close automatically after 2 weeks.