Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I'm curious why nodequeue_load_front and nodequeue_load_back return an array of nodes rather than a single node as there can only be one node at the front or back. nodequeue_load_random_node does return a single node. It took me a while to work out why I wasn't getting the expected result but the random option worked fine.
thanks
Martin
Comment | File | Size | Author |
---|---|---|---|
#2 | nodequeue-446452-2.patch | 1.14 KB | Anonymous (not verified) |
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedThat's a good point -- I'd like to see them return the single node object, not inside a useless array. The fix should be pretty simple. Would you like to submit a patch?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedFirst time for everything...patch submitted. Wasn't that scary!
Changed:
nodequeue_load_front
nodequeue_load_back
nodequeue_view_random_node
all now return a single object rather than array for consistency with nodequeue_load_random_node
Comment #3
ezra-g CreditAttribution: ezra-g commentedCongratulations on your first patch. This is applied. I credited you in the commit message.
I'll highlight this change in the release notes so developers don't get thrown off.
Thanks!
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks Ezra.