I get this when trying to upgrade from Drupal 5.19 to 6.13:

Fatal error: Call to undefined function taxonomy_get_vocabularies() in /var/www/html/modules/forum/forum.install on line 112

I'm following the instruction in UPGRADE.TXT and this happens when running update.php

CommentFileSizeAuthor
#4 forum_569872.patch1 KBjpl-2

Comments

jfha73’s picture

OK this update calls it but I found no taxonomy_get_vocabularies function in the script.

function forum_update_6000() {
  $ret = array();

  $vid = variable_get('forum_nav_vocabulary', 0);
  $vocabularies = taxonomy_get_vocabularies();
  if (!isset($vocabularies[$vid])) {
    $vocabulary = array(
      'name' => t('Forums'),
      'multiple' => 0,
      'required' => 0,
      'hierarchy' => 1,
      'relations' => 0,
      'module' => 'forum',
      'weight' => -10,
      'nodes' => array('forum' => 1),
    );
    taxonomy_save_vocabulary($vocabulary);

    variable_set('forum_nav_vocabulary', $vocabulary['vid']);
  }

  return $ret;
}
jfha73’s picture

Status: Active » Closed (fixed)

OK I found the function in the Taxonomy API page, added it to forum.install and the update.php worked.

jpl-2’s picture

Version: 6.13 » 6.20
Category: support » bug
Status: Closed (fixed) » Active

I'd like to reopen this issue as a bug report against the current version of D6, with the following suggestions:

Given forum.install uses a function from taxonomy.module, and given that taxonomy.module might be still disabled during an attempted update.php of forum.module (especially true if you're in the process of migrating D5 to D6), the update function in forum.install should check whether taxonomy module is enabled before attempting to call (potentially undefined) taxonomy_get_vocabularies.

jpl-2’s picture

StatusFileSize
new1 KB

I'm attaching a patch which fixes this issue by warning the user about the need to enable the required module (just like it's done in CCK/Views).

mile23’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, forum_569872.patch, failed testing.

bib_boy’s picture

just enable Taxonomy first...then run the update of the forum module.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.