Download & Extend

Port Smartqueue to D7

Project:Nodequeue
Version:7.x-2.x-dev
Component:Smartqueue Taxonomy
Category:task
Priority:major
Assigned:slashrsm
Status:closed (fixed)
Issue tags:d7ports

Issue Summary

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

#1

Hmm, something went wrong with the attachments.

AttachmentSizeStatusTest resultOperations
smartqueue-d7-unfinished.patch8.33 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch smartqueue-d7-unfinished.patch.View details

#2

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

#3

Component:Code» Smartqueue Taxonomy
Priority:normal» major
Assigned to:Anonymous» slashrsm
Status:needs work» needs review

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.

AttachmentSizeStatusTest resultOperations
taxonomy_smartqueue_983024_3.patch14.14 KBIdlePASSED: [[SimpleTest]]: [MySQL] 0 pass(es).View details

#4

Status:needs review» fixed

@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.

AttachmentSizeStatusTest resultOperations
taxonomy_smartqueue_983024_4.patch13.73 KBIgnored: Check issue status.NoneNone

#5

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!

#6

Status:fixed» closed (fixed)

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

#7

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

nobody click here