nodequeue_view_nodes() still calls node_view() with D6 style arguments: where D7 node_view() expects a string for $view_mode, nodequeue_view_nodes() passes it a boolean (the boolean argument used to be called $teaser). Also it passes FALSE for $language, which is bogus.

Other modules may behave strangely if we illegally pass TRUE to node_view() instead of a display mode. (In my case it was nodehierarchy, which sets the breadcrumb to the node you're rendering in teaser mode. This is nodehierarchy's fault / not your problem; just FYI.)

--

This patch changes the expected argument to string (but correctly converts old-style TRUE/FALSE to 'teaser'/'full') and fixes the $language parameter.

It also

  • documents and speeds up nodequeue_load_nodes(), without functional change.
  • takes care to keep the return values the same (except for the #language and #weight properties inside the rendered nodes), for backward compatibility - but makes @todo notes to change this to 'D7 style' return values sometime later.
CommentFileSizeAuthor
nodequeue-view-nodes.patch3.25 KBroderik

Comments

  • fizk committed 4418fdc on 7.x-2.x
    Issue #2314177 by roderik: Fix D6 style nodequeue_view_nodes() arguments...
fizk’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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