Hello,

If the FAQ module is enable with the faq_use_categories option set drupal will make one call to the database for each comment. This is very bad for big sites.

If I'm not missing something the solution is easy, you just have to add another condition on line #1969 of faq.module.

From:

function faq_link_alter(&$node, &$links) {
  if (!variable_get('faq_use_categories', FALSE) || !module_exists("taxonomy")) {
    return;
  }

To:

function faq_link_alter(&$node, &$links) {
  if (!variable_get('faq_use_categories', FALSE) || !module_exists("taxonomy") || $node->type != 'faq') {
    return;
  }

Thanks,
introfini

Comments

stella’s picture

Status: Active » Fixed

Thanks! Patch committed for both Drupal 5 and Drupal 6 versions. Will be included in the next dev release, available in the next few hours.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

stella’s picture

Released in 5.x-2.12 and 6.x-1.8.