Commit 354ae494 authored by gbyte.co's avatar gbyte.co

Fix regression introduced in 8.x-2.4 which prevents from excluding content...

Fix regression introduced in 8.x-2.4 which prevents from excluding content which has been included once.
parent 59aef40b
......@@ -70,7 +70,7 @@ class SimplesitemapSettingsForm extends ConfigFormBase {
$form['simple_sitemap_settings']['advanced']['remove_duplicates'] = array(
'#type' => 'checkbox',
'#title' => t('Remove duplicate links'),
'#title' => t('Exclude duplicate links'),
'#description' => t('Uncheck this to significantly speed up the sitemap generation process on a huge site (more than 20 000 indexed entities).'),
'#default_value' => $sitemap->getSetting('remove_duplicates'),
);
......
......@@ -72,14 +72,16 @@ class SitemapGenerator {
$keys = $sitemap_entity_types[$entity_type_name]->getKeys();
$keys['bundle'] = $entity_type_name == 'menu_link_content' ? 'menu_name' : $keys['bundle']; // Menu fix.
foreach($bundles as $bundle_name => $bundle_settings) {
$operations[] = [
'entity_info' => [
'bundle_settings' => $bundle_settings,
'bundle_name' => $bundle_name,
'entity_type_name' => $entity_type_name,
'keys' => $keys,
],
];
if ($bundle_settings['index']) {
$operations[] = [
'entity_info' => [
'bundle_settings' => $bundle_settings,
'bundle_name' => $bundle_name,
'entity_type_name' => $entity_type_name,
'keys' => $keys,
],
];
}
}
}
}
......
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