Just thought I'd flag this up, as it just caught me out on a site where I wasn't using the taxonomy module.

In line 89 of metatags_quick_extra.admin.inc there is the following:

$vocabularies = taxonomy_vocabulary_get_names();

Unless the taxomomy module is enabled, this results in Fatal error: Call to undefined function taxonomy_vocabulary_get_names()

Suggested solution: declare this dependency in the metatags_quick_extra.info file

Comments

valthebald’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Status: Active » Fixed

Fixed in 7.x-2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gynekolog’s picture

Why this fix is not in 7.x-2.7 version?

valthebald’s picture

It' there, see metatags_quick_extra.info

gynekolog’s picture

My bad. I upgraded from 7.x-2.1. on 7.x-2.7. (taxonomy module was disabled). I'm still getting Unless the taxomomy module is enabled, this results in Fatal error: Call to undefined function taxonomy_vocabulary_get_names(). Working solution for me is to change:

  // taxonomy vocabularies that would supply keywords
  $vocabularies = taxonomy_vocabulary_get_names();
  $options = array();
  foreach ($vocabularies as $machine_name => $vocabulary) {
    $options[$machine_name] = $vocabulary->name;
  }
  
  $form['auto_keywords_vocabularies'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Auto-keywords vocabularies'),
    '#options' => $options,
    '#default_value' => isset($current_settings['auto_keywords_vocabularies'])?$current_settings['auto_keywords_vocabularies']:array(),
    '#description' => t('Select the vocabularies which contain terms you want to add to the keywords meta tag for nodes. The terms of these vocabularies are added before the global and default keywords but after the page-specific keywords.')
  );

on

  // taxonomy vocabularies that would supply keywords
  if(module_exists('taxonomy')) {
  $vocabularies = taxonomy_vocabulary_get_names();
  $options = array();
  foreach ($vocabularies as $machine_name => $vocabulary) {
    $options[$machine_name] = $vocabulary->name;
  }
  
  $form['auto_keywords_vocabularies'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Auto-keywords vocabularies'),
    '#options' => $options,
    '#default_value' => isset($current_settings['auto_keywords_vocabularies'])?$current_settings['auto_keywords_vocabularies']:array(),
    '#description' => t('Select the vocabularies which contain terms you want to add to the keywords meta tag for nodes. The terms of these vocabularies are added before the global and default keywords but after the page-specific keywords.')
  );
  }

in metatags_quick_extra.admin.inc