Well here I go again - successfully using xmlsitemap until this morning (NZDT) when I got an error "Error: Call to undefined function redirect_fetch_rids_by_path() in xmlsitemap_generate_chunk() (line 208 of /var/www/example.com/htdocs/backdrop/modules/contrib/xmlsitemap/xmlsitemap.generate.inc)".
Off I went and I found https://forum.backdropcms.org/forum/how-set-xml-sitemap, read through it and decided my best approach would be to uninstall xmlsitemap then install Internationalization and xmlsitemap as per suggestions made in that thread. I had also sidetracked into some Stack Overview and Wordpress threads but nothing there.
Unistalled xmlsitemap, removed module from the server manually, then installed Internationalization and xmlsitemap from the admin panel (/admin/modules/install) and activated them from admin panel.
Then I went and configured xmlsitemap - checked necessary content types were switched to "included" and saved configuration. Then went to https://example.com/admin/config/search/xmlsitemap/rebuild and clicked "Rebuild Sitemap". Process started properly and got to 1580 of 1605 entries then it threw an error "An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=1383&op=do_nojs&op=do StatusText: Service unavailable (with message) ResponseText:". Immediately checked the dblog and saw the message "Error: Call to undefined function redirect_fetch_rids_by_path() in xmlsitemap_generate_chunk() (line 208 of /var/www/example.com/htdocs/backdrop/modules/contrib/xmlsitemap/xmlsitemap.generate.inc)".
Thinking back on some of my earlier research I thought I'd look at files/xmlsitemap and see what I had generated:
"<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">"
I noted only the 3 lines above in the relevant (?) file "1.xml". In an early iteration I had received an error "XML Parsing Error: no root element found Location: https://example.com/sitemap.xml Line Number 4, Column 1:" and wonder if I have a space on line 4 as editing the file in Joe sees the cursor land on line 4. Editing the 4th line out in Joe, and Rebuilding Sitemap again repeats the AJAX error above and a check of the 1.xml file again shows 4 lines.
So now I'm lost as to where to go from here.... Any Suggestions?
Comments
There were some commits in that module that weren't in the latest release. I just made a new release -- can you test again with that one?
Tried updating module from admin Available Updates - it seemed to install ok but I got the error again. Checked the xmlsitemap.info file which shows the version as:
; Added by Backdrop CMS packaging script on 2024-10-03
project = xmlsitemap
version = 1.x-1.0.10
timestamp = 1727973141
Checked the datestamps on the files in contrib/xlmsitemap and they are all showing Jan 27 which is today's date in New Zealand.
OK Laryn - I found the 1.x-1.0.11 version and downloaded and installed it.
Rebuilt the links and now have an updated sitemap that actually shows a last modified date of 2025 for one file. I have modified several this year but I'll work out why they don't show a last modified date (probably because I've rebuilt the links).