Active
Project:
XML sitemap
Version:
7.x-2.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2020 at 10:18 UTC
Updated:
14 Mar 2025 at 18:35 UTC
Jump to comment: Most recent
My site has some specific access/pubblication workflows about nodes so I'd like to run via code the rebuild function of your module that I find in admin/config/search/xmlsitemap/rebuild
I tried with this custom code during a cron job:
module_load_include('admin.inc', 'xmlsitemap');
xmlsitemap_rebuild_form();This doesn't returns me errors but I see the form does not add new links to my sitemap.xml file but if I run it manually from the page it works.
Can you please tell me ho to trigger via code the rebuild of XML sitemap?
Thanks!
Comments
Comment #2
daniel_arend commentedIn my case, this works:
Comment #3
j_s commentedOld but still active issue. For 8.x-1.5, this worked for me: