Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In module's "Advanced settings" (admin/config/search/xmlsitemap/settings), set Default base URL value to a single forward slash "/", and save the configuration.
Form is saved without any error.
Once the settings page reloads, Default base URL value becomes empty; which causing the <loc>
entries in sitemap.xml to be relative to the site root.
<url><loc>/node-51-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
<url><loc>/node-52-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
<url><loc>/node-53-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
<url><loc>/node-54-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
A patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#3 | xmlsitemap_base_url_variable_should_not_be_empty-1960798-2.patch | 782 bytes | osman |
#1 | xmlsitemap_base_url variable should not be empty-1960798-1.patch | 782 bytes | osman |
Comments
Comment #1
osmanAttached patch disallows entering only a "/"
Comment #3
osmanSimpleTest doesn't like space in filename I guess, my bad :)