I have been trying to get Smartqueue working on D7 but I couldn't figure it all out in the time I had available last week. Still I wanted to to share the progress I made as a basis for further development. Be warned, it's messy code in some places, with TODO's and commented dsm()'s.
One important change is the switch from D6-style taxonomy to the Field API based taxonomy in D7. Instead of creating a subqueue per vocabulary, in D7 it makes sense to create a subqueue per taxonomy_term_reference field. See #978242: Document the changes to taxonomy.module properly to avoid confusion about missing $node->taxonomy property for more info.
I hope this helps anyone. If I have time, I may pick it up myself later.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | taxonomy_smartqueue_983024_4.patch | 13.73 KB | amateescu |
| #3 | taxonomy_smartqueue_983024_3.patch | 14.14 KB | slashrsm |
| #1 | smartqueue-d7-unfinished.patch | 8.33 KB | marcvangend |
Comments
Comment #1
marcvangendHmm, something went wrong with the attachments.
Comment #2
mgiffordproviding back link to duplicate http://drupal.org/node/965530
Comment #3
slashrsm commentedThis patch works on D7 for me. Please test and review.
There are two functions on smartqueue.module that could probbably be removed:
Can someone confirm this?
Taxonomy smartqueues are really useful, so we should get this to RTBC status ASAP. Marking as major because of that.
Comment #4
amateescu commented@slashrsm, thanks for your great work on this.
Apart from some whitespaces, I only found one problem in your patch and fixed it by using
field_get_items()insmartqueue_taxonomy_nodequeue_subqueues()as a more reliable way of getting the field values.Indeed,
smartqueue_taxonomy_get_terms()was not used anywhere else so I removed it, butsmartqueue_nodequeue_alter()is still called by nodequeue.module innodequeue_load_queues():drupal_alter('nodequeue', $loaded, 'load_queues');Commited attached patch to 7.x-2.x.
Comment #5
Tim Jones Toronto commentedGood work! I have just tested #3, works great (#4 was ONLY JUST posted as I am replying here, so will try it also!).
Cheers!
Comment #7
moondancerjen commentedI tested the patch in number 4 and it's working well for me! Thank you for fixing this!