Commit f0eca205 authored by gbyte.co's avatar gbyte.co

Issue #2696373 by Alexander Tsybenko: Adding as dependency in installation profile produces error

parent 8b8741c1
......@@ -80,7 +80,7 @@ function simple_sitemap_schema() {
*/
function simple_sitemap_install() {
$sitemap = \Drupal::service('simple_sitemap.generator');
$sitemap->generateSitemap('backend');
$sitemap->generateSitemap('nobatch');
$base_url = $GLOBALS['base_url'];
drupal_set_message(t("You can now include content into the <a href='@sitemap_url' target='_blank'>XML sitemap</a> by visiting the corresponding entity type edit pages (e.g. <a href='@content_type_url' target='_blank'>content type</a>, <a href='@taxonomy_vocabulary_url' target='_blank'>taxonomy vocabulary</a>, <a href='@menu_url' target='_blank'>menu</a> and <a href='@user_url' target='_blank'>user</a> pages.)<br/>Custom links can be added on <a href='@config_url' target='_blank'>this configuration page</a>.", array('@sitemap_url' => "$base_url/sitemap.xml", '@content_type_url' => "$base_url/admin/structure/types", '@taxonomy_vocabulary_url' => "$base_url/admin/structure/taxonomy", '@menu_url' => "$base_url/admin/structure/menu", '@user_url' => "$base_url/admin/config/people/accounts", '@config_url' => "$base_url/admin/config/search/simplesitemap/custom")));
}
This diff is collapsed.
......@@ -128,5 +128,6 @@ class SimplesitemapSettingsForm extends ConfigFormBase {
public function generateSitemap(array &$form, FormStateInterface $form_state) {
$sitemap = \Drupal::service('simple_sitemap.generator');
$sitemap->generateSitemap();
// $sitemap->generateSitemap('nobatch');
}
}
......@@ -189,3 +189,4 @@ class SitemapGenerator {
return $writer->outputMemory();
}
}
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