Is there any reason why the following code in a block works with nodequeue-6.x-2.0-rc3 but crashes the page with 6.x-2.0?

print nodequeue_fetch_random(1, $teasers = true, $links = false);

Comments

ezra-g’s picture

Status: Active » Fixed

Yes, there was a minor api change which is mentioned in the release notes for the 6.x-2.0 version. Please see the release notes and doxygen function descriptions for clarification and re-open this issue if it is still unclear.

droopy’s picture

Sorry, I can't find anything in the release notes and I've no idea where the function descriptions are. The documentation still has:

nodequeue_fetch_random($qid, $teasers = TRUE, $links = TRUE)

What am I missing?

droopy’s picture

Status: Fixed » Postponed (maintainer needs more info)

Sorry, forgot to reopen.

ezra-g’s picture

Title: Block not working » Update Documentation for API changes
Component: Code » Documentation
Category: support » task
Status: Postponed (maintainer needs more info) » Active

I updated the code examples to reflect the new api changes. see "To render the first or last node from a queue" in the documentation.

The available function list still needs to be updated at the bottom of that page.

For future reference, the function descriptions are commented lines directly above the function definition inside the module.

fletchgqc’s picture

My code was working fine with v1, now I've upgraded to 2.x and changed the code to say:

$thenode = nodequeue_load_back(4);
print node_view($thenode); 

and nothing is printed... despite there being something in the queue. So something is wrong with the doco or the code I think (I'm using 2.0 release).

fletchgqc’s picture

Hmm... on second thoughts I think there's some kind of CCK error causing my problems. I've got a message "warning: Invalid argument supplied for foreach() in /usr/home/caiiorg/dev2/sites/all/modules/cck/content.module on line 1270." so I'll take it up over there.

ezra-g’s picture

Title: Update Documentation for API changes » Update Readme Documentation for API changes
ezra-g’s picture

I updated this information in the README

amateescu’s picture

Status: Active » Closed (fixed)

I guess this is fixed :)