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
Comment #1
marble commentedFixed in CVS, thanks.
Comment #2
(not verified) commented