I'm currently using the development version of the module, and have been assigning vocab index pages to a custom menu.

I noticed that not all of my vocabulary items are showing up in the vocabulary index page. I have 14 Vocabularies, but only 9 are showing up in the Vocabulary Index page. The Vocabulary items that are missing have terms assigned to them.

Comments

xano’s picture

Status: Active » Closed (duplicate)
shelleyp’s picture

Status: Closed (duplicate) » Active

You do have a typo in vocabindex.install -- missing line break between comment and drupal_uninstall_schema, which leaves the vocabindex table. But the module still is not picking up all of the vocabulary items. And these are being returned by the call to taxonomy_get_vocabularies, but they're not showing up in the vocabindex table after the plug-in is enabled.

xano’s picture

Status: Active » Closed (duplicate)

I don't see any missing line breaks here.

By the way, would you be so kind to create a new issue for every distinct problem?

shelleyp’s picture

Status: Closed (duplicate) » Active

I found the problem. In vocabindex.install you have:

$vocs = taxonomy_get_vocabularies();
// Beware, the first VID is 1, not 0
for ($i = 1, $len_i = count($vocs); $i <= $len_i; $i++) {
vocabindex_create($vocs[$i]->vid);
}

However, the taxonomy items aren't always ordered. If taxonomy items have been deleted, or new ones added, the sequence of vocabulary indexes will not be sequential. You're assuming sequential.

If you replace the for loop with the following, installation works:

foreach ($vocs as $voc) {
vocabindex_create($voc->vid);
}

I don't know how to do Drupal module patches or would submit a patch.

shelleyp’s picture

No, this seems to be a different issue. That thread is discussing items being added via an application. Mine isn't related to the thing called ubercart.

xano’s picture

Status: Active » Closed (duplicate)

Wow, I think you may have found the problem! Would you be so kind to post your solution here?

More info about patches.

shelleyp’s picture

Looks like someone has already. Glad to worked with both situations.

Thanks for the link to info on how to do Drupal patches.