Due to the check for poll results the menu_get_object() gets called. When in a particular use case menu_set_item(NULL,$node) is set, for example to change the active menu trail, the menu_get_object() the nid that is returned after checking for the poll results is not the nid from the $arg[1] but the $node->nid from $node = menu_get_object().

I think it will be better to return $arg[1] instead of $node->nid

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ralphvdhoudt’s picture

FileSize
359 bytes

My proposed path to fix the issue

DamienMcKenna’s picture

Status: Active » Needs review

In that case, shouldn't it instead change to the following?

    if (isset($arg[1]) && is_numeric($arg[1]) && ($node = node_load($arg[1]))) {
DamienMcKenna’s picture

Version: 6.x-1.14 » 6.x-1.x-dev
Issue summary: View changes
FileSize
450 bytes

A patch based upon the code from #2.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

DamienMcKenna’s picture

  • DamienMcKenna committed b591c37 on 6.x-1.x
    Issue #1961104 by DamienMcKenna: Use arg(1) when loading the node on...

Status: Fixed » Closed (fixed)

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