Skip to content

Add redirect exporter

Alberto Silva requested to merge redirect_exporter into 1.1.x

Adds a redirect exporter that can export data to JSON/XML but also to CSV in a fully configurable way.

It makes use of path alias repository to get all paths as fast as possible. Hence, we don't use a more robust functionality like Url::fromUri(), which goes through all inbound processing, making it impossible to run the exporter when thousands of redirects exist. ~5K redirects are exported in 0.2 seconds on my laptop.

This exporter is triggered when:

  • a URL redirect is added, updated or deleted
  • a path alias is added, updated or deleted
  • a configuration that affects any language changes: I have created a new Drupal\static_export\EventSubscriber\LanguageModifiedEventSubscriber that dispatches a LanguageModifiedEvents::LANGUAGE_MODIFIED event when any language changes. Its located inside static_export (at this moment, it's only used by exporters) but can be moved to Static Suite core if required

This exporter makes use of the ExporterStackExecutor

Merge request reports