Sorry, I'm confused.

I navigated to each of my content types and enabled (checked) "Index content of this type." I then enabled Simple Sitemap for my Taxonomy terms.

I then navigated to "Configuration > Simple XML Sitemap Settings" and pressed the "Regenerate Content" button and -- after processing the request -- Simple XML Sitemap reported "The XML sitemap has been regenerated for all languages." I then loaded which resulted in this...


Where are the mappings to all of my content types and taxonomy?

In addition, there does not appear to be any sitemap.xml file located in my site's root directory (when I look with my FTP client).

What am I doing wrong?

#16 sitemap_only_updated-2678146-16.patch525 byteshctom


Q2U2 created an issue. See original summary.’s picture

You do not appear to be doing anything wrong.

There is no physical file, as sitemaps are cached in the database (as a matter of fact you will not find any pages you create on the server via ftp). Most pages in Drupal (and most CMSs for that matter) are created dynamically from the DB.

If you find links are missing on the sitemap, make sure the content you intend to index is viewable by anonymous users.

If that's the case and regenerating the sitemap doesn't work for some reason, please clear caches, regenerate again. Waiting for your report.

Is your site public, can you provide its address? No worries, I see you provided the address on my blog. :)’s picture

Can you please try the dev version? I've noticed a cache invalidation problem and temporarily addressed it in the dev version. Please do not forget to clear the caches after updating the module files. Looking forward to your report.

Q2U’s picture

Thank you very much for your quick response. I performed the following steps...

  1. Put my D8.0.4 site in Maintenance Mode
  2. Uninstalled Simple Site Map 8.x-2.1 (Recommended Release)
  3. Used my FTP client to delete the Simple Site Map 8.x-2.1 directory on my web server
  4. Cleared my site cache
  5. Installed Simple Site Map 8.x-2.x-dev (Dev Release)
  6. Cleared my site cache again because...well because I'm essentially Qlueless
  7. Revisited all of the content types which I want included in my XMP SiteMap
  8. Navigated to Configuration > Simple XML Sitemap Settings and regenerated my SiteMap
  9. And there is joy! My XML site map is alive in all its depth and glory

Hey, thanks a lot GB! My issue may well be cache related as you surmised.’s picture

Title: I'm confused... » Sitemap only updated after clearing the cache
Component: Documentation » Code
Category: Support request » Bug report
Status: Active » Closed (fixed)
Issue tags: -Documentation?

That's great!

Anonymous’s picture

Version: 8.x-2.1 » 8.x-2.x-dev
Status: Closed (fixed) » Active

The sitemap still doesn't get updated with the caching enabled. After disabling the cache I got the sitemap generated.

Anonymous’s picture

As soon as I enable the cache the sitemap gets empty again.’s picture

Have you cleared the cache after upgrading to the dev version?

Anonymous’s picture

Status: Active » Closed (fixed)

Yes, I did clear the cache. But for some reason after reinstalling it works.

lmedrano’s picture

I cleared cache, installed dev version and followed step by srep instructions on #4 and #8, but nothing, just a blank page (on firefox) with the custom links on it (just text, no links).
I have moved my site from localhost to live server.

Any other idea?

Anonymous’s picture

Imedrano you should notice that currently this ticket is marked as closed. Please make sure to mark it as open if the issue persists.’s picture

@Imedrano The ticket was marked closed, hence I did not see your post.

The "blank page with custom links on it" is correct, this is how firefox interprets hreflang sitemaps. Press ctrl+u to see what the bots see. If you are missing content type links, you haven't configured your sitemap yet. Please read the readme.txt file from the module root directory.

As mentioned, if your problem persists, please reopen the ticket.’s picture

Status: Closed (fixed) » Active

I am reopening this ticket. Its confusing because regenerated sitemap is visible only after clearing the caches. I think this module should invalidate sitemap cache whenever "Regenerate sitemap" option is used.’s picture

This should be the case with the dev version of the 2.x branch. Please get back to me with your findings.

hctom’s picture

We are experiencing similar problems with our sitemap. We are using the latest dev-release (with commit 134f4ee0cc0092c6bcbbbee4d4abdc7360d9fe8d) and here are the steps to reproduce our problems:

  1. Create tons of content on your site (e.g. via devel_generate or Drupal Console)
  2. Configure sitemap settings to include content and hit the "Regenerate sitemap button" on /admin/config/search/simplesitemap
  3. Do not wait until generation is done, just head over to /sitemap.xml - you will see the sitemap with the currently added items
  4. Wait for generation to finish and access /sitemap.xml again - No changes are present, the last accessed state is displayed
  5. Clear all caches and visit /sitemap.xml - All items are present now

This may really cause problems, e.g. when the sitemap crawler visits the sitemap during regeneration (e.g. via cron), then the sitemap might even be completely empty and won't display real content until either the caches are cleared or the sitemap is generated again.

I'd appreciate your help, if there is an easy fix for this. I will also dig through the code to see if I can find a place, where to invalidate cache at the end of the generation. If I find something, I will provide a patch.

hctom’s picture

Status: Active » Needs review
525 bytes

Okay, this was easy ;) Here is the proposed patch with cache tag invalidation for the sitemap output’s picture

Status: Needs review » Fixed

@hctom thanks for your observations. I can't use your patch, as it would trigger a cache clear after the creation of every single sitemap chunk. I have moved the cache invalidation to the function triggered when batch finishes.
Please test and feel free to reopen the issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

raj45’s picture

My sitemap would occasionally disappear for no apparent reason, and only re-appeared after manually running cron, so I have resorted to running cron every 15th minute, with this in my crontab:

## run cron every 15th minute mainly to generate site map - MAILTO set to empty due to irrelevant mail alert about empty result page
*/15 * * * * /usr/bin/lynx -source 
Q2U’s picture

+1...I believe I'm having the same issue. For no readily apparent reason -- occasionally -- my sitemap isn't present when it is called, as shown in the screenshot below...

To remedy the issue I need to regenerate sitemap my sitemap manually.

raj45’s picture

Status: Closed (fixed) » Active

Setting Status to Active again.

hctom’s picture

As far as i see, The Problem is that cron regenerates the Sitemap in a single process with no real Batch. So if you have a lot of content this may lead to a timeout

raj45’s picture

@hctom: I only have 135 pages, so missing Batch process shouldn't be the problem in my case ...

Q2U’s picture

I only have a couple hundred pages also.

This issue should probably have been entered as a separate and distinct issue.

My sitemap disappears regularly, as shown below...

Q2U’s picture

Priority: Normal » Critical

Changing status to "Critical."’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

I cannot reproduce this in any of my projects, so it would be very beneficial if you could figure out when and how this happens.
#2711761: Sitemap sometimes disappearing may be related?
But first of all please open a new ticket for this issue for 8.x-2.x-dev.’s picture