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.

Comments

marcvangend’s picture

StatusFileSize
new8.33 KB

Hmm, something went wrong with the attachments.

mgifford’s picture

providing back link to duplicate http://drupal.org/node/965530

slashrsm’s picture

Component: Code » Smartqueue Taxonomy
Assigned: Unassigned » slashrsm
Priority: Normal » Major
Status: Needs work » Needs review
Issue tags: +d7ports
StatusFileSize
new14.14 KB

This patch works on D7 for me. Please test and review.

There are two functions on smartqueue.module that could probbably be removed:

  • smartqueue_nodequeue_alter(): it seems like nodequeue does not fire this hook at all...
  • smartqueue_taxonomy_get_terms(): it was used to get list of terms in smartqueue_taxonomy_nodequeue_subqueue_title(), but it is not used anymore, since we use taxonomy_term_load().

Can someone confirm this?

Taxonomy smartqueues are really useful, so we should get this to RTBC status ASAP. Marking as major because of that.

amateescu’s picture

Status: Needs review » Fixed
StatusFileSize
new13.73 KB

@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() in smartqueue_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, but smartqueue_nodequeue_alter() is still called by nodequeue.module in nodequeue_load_queues(): drupal_alter('nodequeue', $loaded, 'load_queues');

Commited attached patch to 7.x-2.x.

Tim Jones Toronto’s picture

Good work! I have just tested #3, works great (#4 was ONLY JUST posted as I am replying here, so will try it also!).

Cheers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

moondancerjen’s picture

I tested the patch in number 4 and it's working well for me! Thank you for fixing this!