Quantcast
Channel: Issues for XML sitemap
Viewing all articles
Browse latest Browse all 1238

XML sitemap needs to bootstrap to DRUPAL_BOOTSTRAP_CONFIGURATION before using variable_get in hook_drush_command()

$
0
0

Problem/Motivation

Using a patch to make variable.inc pluggable, I get a fatal error when xmlsitemap uses variable_get in hook_drush_command.

This however means that that variable_get() never worked anyway.

Proposed resolution

diff --git a/xmlsitemap.drush.inc b/xmlsitemap.drush.inc
--- a/xmlsitemap.drush.inc
+++ b/xmlsitemap.drush.inc
@@ -21,6 +21,9 @@ function xmlsitemap_drush_command() {
     'callback' => 'drush_xmlsitemap_rebuild',
     'drupal dependencies' => array('xmlsitemap'),
   );
+
+  drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
+
   $items['xmlsitemap-index'] = array(
     'description' => 'Process un-indexed XML sitemap links.',
     'callback' => 'drush_xmlsitemap_index',

Remaining tasks

* Create patch.


Viewing all articles
Browse latest Browse all 1238

Trending Articles