Once I've set up the smartqueue for my group content type and submit the form, it creates smartqueues for each existing group. But, when I create a new group, it doesn't seem as if the queue for the new group is created. If I resubmit the smartqueue form, the new group's queue is created.
Am I missing something, or is this the desired behaviour?
In my case, I'd like this to be automatic - so if it's not a behaviour catered for with this module, I think I will use something like workflow-ng to force the creation of the subqueue. Then, when a new group is created, the subqueue is also created.
Let me know if you think there's a better way to do it, or if I'm missing something :-)
Thanks.
Comments
Comment #1
ezra-g commentedIt *should* create a new queue for all eligible nodes. It checks new/updated nodes with smartqueue_og_eligible_group_type($node->type).
Comment #2
foxtrotcharlie commentedJa, I thought so. It does create it because it tells me in the notice message. But, it doesn't appear in the smartqueue list.
When looking in the database though it's referencing a non-existent nodequeue (qid=0). So I deleted all nodequeues and subqueues, and manually deleted a couple of orphaned rows in the nodequeue_subqueue table, recreated the smartqueue for my groups, which created the subqueues for all existing groups. But, when I created a new group, although it tells me it's created a new node queue, it doesn't appear in the list of all the subqueues.
When I check the database the new subqueue is there, but the qid=0;
I checked the code, and it looks like the correct qid is returned from the function smartqueue_og_get_qid(), and the problem manifests in the function nodequeue_add_subqueue
In the line where it assigns the subqueue qid it's expecting the $queue parameter to be an object, where it's actually an integer that's obtained from the function smartqueue_og_get_qid().
If I change the function smartqueue_og_nodeapi at line 324 from:
To:
By first creating the queue object, and passing this to the nodequeue_add_subqueue function, the new group is assigned to the correct qid. I'm not sure if this change would cause any issues anywhere else though? Does this seem like a good solution? Can you even replicate my issue?
Comment #3
foxtrotcharlie commentedIm not sure, but perhaps it's better to do the creation of the queue object as follows, instead of how I did it above:
Comment #4
ezra-g commentedThanks for this report. I'll try to replicate this and see what's going on.
Comment #5
ezra-g commentedI manually applied a fix for this problem. Thanks for identifying it! FYI, issues generally get addressed quicker with patches :D.
See http://drupal.org/patch/create for instructions on creating a patch.
Comment #6
foxtrotcharlie commentedlol - yes, but the first one is always so daunting ;-) And I'm on windows - I get the feeling it's slightly harder. But, that's no excuse. I promise to do it the next time, no matter what :D
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.