Install

Works with Drupal: ^8 || ^9

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 96.47 KB
MD5: d5fc65e794a3977d035f28043894015a
SHA-1: ed4091a1413e765f07867abdd0f9e418c7a59c47
SHA-256: 65705f6a57fd6c23c290f52d3fa1bae5bc40b4fc007ef2cea4ff4a98b4c37b71
Download zip 157.28 KB
MD5: f010ed25038576d2f7208601896e79c3
SHA-1: 37fc0ae98a4ccb23316cb089ae4839913e80cbf6
SHA-256: 6f2d7f0d4685ab34f4cdcf16b5a4a1fe00dd1e8077bb7a7e71033e99a3310b62

Release notes

Changes since 3.5

New features

Drush 10 support

Bug fixes

#3102450: Manual generated sitemap differs from drush and cron generated
#3118054: Notice: Undefined index: html_head_link in simple_sitemap_page_attachments_alter()
#3082387: Incorrect XSL links for different language domains. Styling and sorting option is not working properly
#3118929: Notice: Trying to access array offset on value of type null (PHP 7.4 compatibility fix)

Improvements

#3102084: Incompatible with modules that override the Messenger service
#3094829: Prevent submitting empty/unaccessible variants
#3106644: Depend on LanguageManagerInterface, not LanguageManager
#3112939: Drupal 9 deprecated code report for Simple XML Sitemap
#3107818: Treat multilingual site with no URL detection as monolingual
#3126308: Clean up simple_sitemap_engines state variables on uninstall

API changes

  • The constant Drupal\simple_sitemap\SimplesitemapManager::DEFAULT_SITEMAP_GENERATOR has been removed as it has not been used internally anymore
  • The interface \Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\SitemapGeneratorInterface has been altered and requires the method getSitemapUrl(). Usually should not cause API breakage as this method is included in SitemapGeneratorBase.

Changes since 2.x

Ability to create any type of sitemap via plugins

The 8.x-3.x release allows not only for customizing the URL generation through UrlGenerator plugins as 2.x does, but also creating multiple custom sitemap types through sitemapGenerator plugins and running all the sitemaps on the same Drupal instance. Now e.g a Google news sitemap can be added to a Drupal instance. This is possible through the new concept of sitemap variants.

Ability to create sitemap variants of various sitemap types via UI

Now e.g links form a specific entity bundle can be indexed in a specific sitemap variant with its own URL.

No more out of memory/time errors

The generation process has been streamlined to using a single queue regardless of whether batch generation is being used, or backend (cron/drush) processes. This should allow hundreds of thousands of entities/elements being indexed without memory errors.
If there is a problem, the generation process picks up from the last indexed element. The sitemap variants are only published after the generation has been completed.

Other

  • Automatic submission to search engines
  • Views and views arguments support
  • XSL stylesheets for human visitors

Upgrade path from 2.x

The module can be easily upgraded from 8.x-2.x for regular users, however the API has undergone several changes and custom code may need adjustments.

API

Please make sure to use the below simple_sitemap.generator service API instead of accessing the module's configuration storage directly.

  • getSetting
  • saveSetting
  • setVariants
  • getSitemap
  • removeSitemap
  • queue
  • rebuildQueue
  • generateSitemap
  • enableEntityType
  • disableEntityType
  • setBundleSettings
  • getBundleSettings
  • removeBundleSettings
  • setEntityInstanceSettings
  • getEntityInstanceSettings
  • removeEntityInstanceSettings
  • bundleIsIndexed
  • entityTypeIsEnabled
  • addCustomLink
  • getCustomLinks
  • removeCustomLinks
  • getSitemapManager
    • getSitemapVariants
    • addSitemapVariant
    • removeSitemapVariants
  • getQueueWorker
    • getInitialElementCount
    • getProcessedElementCount
    • generationInProgress
  • hook_simple_sitemap_links_alter(&$links, $sitemap_variant)
  • hook_simple_sitemap_arbitrary_links_alter(&$arbitrary_links, $sitemap_variant)
  • hook_simple_sitemap_attributes_alter(&$attributes, $sitemap_variant)
  • hook_simple_sitemap_index_attributes_alter(&$index_attributes, $sitemap_variant)
  • hook_simple_sitemap_url_generators_alter(&$url_generators)
  • hook_simple_sitemap_sitemap_generators_alter(&$sitemap_generators)
  • hook_simple_sitemap_sitemap_types_alter(&$sitemap_types)

Check out this resource for more details about the module and in-depth tutorials.

Created by: gbyte
Created on: 9 Apr 2020 at 21:36 UTC
Last updated: 9 Apr 2020 at 22:05 UTC
Bug fixes
New features
Unsupported

Other releases