I've found a bug in the Latest Recipes view that shows the latest nodes (all types), not just the latest recipe nodes. This situation occurs when there isn't a taxonomy vocabulary associated with the recipe node-type. Here's the code that causes the error from the recipe_select_nodes() function:

  } else {
    // no taxonomy used
    $sql = 'SELECT nid, title, sticky, created FROM {node} WHERE status = 1 ORDER BY sticky DESC, created DESC';
    $sql_count = 'SELECT COUNT(nid) FROM {node} WHERE status = 1';
  }

An easy fix for this bug would be to insert AND type = "recipe" into the queries as shown below:

  } else {
    // no taxonomy used
    $sql = 'SELECT nid, title, sticky, created FROM {node} WHERE status = 1 AND type = "recipe" ORDER BY sticky DESC, created DESC';
    $sql_count = 'SELECT COUNT(nid) FROM {node} WHERE status = 1 AND type = "recipe"';
  }

Comments

marble’s picture

Status: Active » Fixed

Fixed in CVS, thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)