Please add to nodequeue_generate if deemed useful. This runs at the end of our data migrations since we create new terms each time we migrate
/**
* Rebuild all smartqueue_taxonomy queues. Useful after a data migration has wiped your terms.
* When more smartqueue modules arrive, revisit this function.
*
* @param vids
* An array of vocabulary ids.
**/
function nodequeue_generate_rehash($vids) {
// Delete existing smartqueue taxonomy subqueues
db_query("DELETE ns FROM nodequeue_subqueue ns INNER JOIN nodequeue_queue nq ON ns.qid=nq.qid WHERE nq.owner = 'smartqueue_taxonomy'");
// Re-add those subqueues
$node = new stdClass;
$tree = array();
foreach ($vids as $vid) {
$tree += taxonomy_get_tree($vid);
}
$node->taxonomy = $tree;
$queues = nodequeue_load_queues(nodequeue_get_all_qids(200));
foreach ($queues as $queue) {
if ($queue->owner == 'smartqueue_taxonomy') {
nodequeue_api_subqueues(&$queue, $node);
}
}
}
Comments
Comment #1
merlinofchaos commentedCommitted!
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.