Commit ba70e495 authored by gbyte.co's avatar gbyte.co Committed by gbyte.co

Issue #3057055 by gbyte.co: 'Regenerate sitemap after hitting save' generates default variant only

parent 715f500a
......@@ -135,7 +135,9 @@ function simple_sitemap_entity_form_submit($form, FormStateInterface &$form_stat
// Regenerate sitemaps according to user setting.
if ($values['simple_sitemap_regenerate_now']) {
$generator->rebuildQueue()->generateSitemap();
$generator->setVariants(TRUE)
->rebuildQueue()
->generateSitemap();
}
}
}
......
......@@ -163,7 +163,9 @@ class SimplesitemapCustomLinksForm extends SimplesitemapFormBase {
// Regenerate sitemaps according to user setting.
if ($form_state->getValue('simple_sitemap_regenerate_now')) {
$this->generator->rebuildQueue()->generateSitemap();
$this->generator->setVariants(TRUE)
->rebuildQueue()
->generateSitemap();
}
}
......
......@@ -196,7 +196,9 @@ class SimplesitemapEntitiesForm extends SimplesitemapFormBase {
// Regenerate sitemaps according to user setting.
if ($form_state->getValue('simple_sitemap_regenerate_now')) {
$this->generator->generateSitemap();
$this->generator->setVariants(TRUE)
->rebuildQueue()
->generateSitemap();
}
}
......
......@@ -387,7 +387,9 @@ class SimplesitemapSettingsForm extends SimplesitemapFormBase {
// Regenerate sitemaps according to user setting.
if ($form_state->getValue('simple_sitemap_regenerate_now')) {
$this->generator->rebuildQueue()->generateSitemap();
$this->generator->setVariants(TRUE)
->rebuildQueue()
->generateSitemap();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment