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.
When i configure sitemap in drupal 8 and try to rebuild this it is showing ajax error after that when i checked log message it pormpted
Drupal\xmlsitemap\XmlSitemapGenerationException: Could not open file public://xmlsitemap/NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM/1.xml for writing. in Drupal\xmlsitemap\XmlSitemapWriter->openUri() (line 84 of /var/www/drupal8/modules/xmlsitemap/src/XmlSitemapWriter.php).
This error so i am not able to configure this module in my website.
Comments
Comment #2
sushilkr CreditAttribution: sushilkr commentedComment #3
jghyde CreditAttribution: jghyde commentedusing the .dev version.
As an admin user, when clicking on the "Rebuild" tab, you received a 500 error for the ajax.
When clicking on the "run cron" link in admin/report/status, XMLSitemap does not rebuild a sitemap and complains that the sitemap cache is empty.
The Recent Log entries indicates:
I deleted the sitemap included with the module and created a new sitemap. The error I get this time is:
InvalidArgumentException: The URI '<front>' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 306 of /var/www/example.com/prod/htdocs/core/lib/Drupal/Core/Url.php).
Comment #4
sajiniantony CreditAttribution: sajiniantony commentedI tried installing the 8.x-1.0-alpha2.When i configure sitemap in drupal 8 and try to rebuild this it is showing ajax error.
Comment #5
Chayemor CreditAttribution: Chayemor commentedI can confirm the error, I get the following report:
InvalidArgumentException: The URI '<front>' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 280 of /var/www/vhosts/mysite.com/httpdocs/core/lib/Drupal/Core/Url.php).
Comment #6
Chayemor CreditAttribution: Chayemor commentedI just found a way to generate the XML sitemap without that error provoking an exception, be sure to have your site's base URL set in Advanced Settings in
admin/config/search/xmlsitemap/settings
, under Default base URL.Comment #7
deajan CreditAttribution: deajan commentedGetting the same error here with Drupal 8.3.0 and xmlsitemap 8.x-1.0-alpha2
InvalidArgumentException : The URI '<front>' is invalid. You must use a valid URI scheme. dans Drupal\Core\Url::fromUri()
My front page is set to '/node'.
Anything I can do here ?
Comment #8
G42 CreditAttribution: G42 commented#6 from Chayemor is important, 'the URI '/' is invalid' sounds like the default base url for your site was not set.
The original error 'Drupal\xmlsitemap\XmlSitemapGenerationException: Could not open file public://xmlsitemap' sounds like the xmlsitemap folder has not been created. Make sure it exists in your site's public files folder.
Comment #9
marciuz CreditAttribution: marciuz commentedI resolved with the full domain root in the Default base URL.
It seems that the default value (internally treated as ?) isn't recognized nor transformed by the system.
In other words, go to admin/config/search/xmlsitemap/settings
and in Advanced Settings -> Default Base URL,
set your full domain (e.g http://www.yourwebsite.com/).
This worked for me.
Comment #10
Dave ReidThe issues with the or "The URI '/' is invalid" have been resolved in the latest versions of the module, I would encourage you to update and try it out.