Commit 6f58d9de authored by gbyte.co's avatar gbyte.co

Alter update 8206 to prevent processing core keys in simple_sitemap.custom config

parent f77dc999
......@@ -279,7 +279,11 @@ function simple_sitemap_update_8205() {
*/
function simple_sitemap_update_8206() {
$custom_links = \Drupal::config('simple_sitemap.custom')->get();
unset($custom_links['_core']);
foreach($custom_links as $i => $custom_link) {
if (!isset($custom_link['path'])) {
unset($custom_links[$i]);
}
}
\Drupal::service('config.factory')->getEditable("simple_sitemap.custom")
->setData(['links' => $custom_links])->save();
}
......@@ -65,7 +65,7 @@ class Batch {
batch_set($this->batch);
$this->batch =& batch_get();
$this->batch['progressive'] = FALSE;
// todo: Does not take advantage of batch API and eventually runs out of memory on very large sites.
// todo: Does not take advantage of batch API and eventually runs out of memory on very large sites. Use queue API instead?
batch_process();
break;
......
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