There are two typos in workbench_access_handler_field_section.inc:

    if ($view->base_table == 'node_revisions') {
      $this->additional_fields['nid'] = array('table' => 'node_revisions', 'field' => 'nid');
    }
    else {
      $this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid');
    }

It's been driving me mad looking for this bug. This causes the "My Workbench" and "My Edits" admin pages to show the following debug message:

'Handler workbench_access_handler_field_section tried to add additional_field nid but node could not be added!'

Patch follows.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zhangtaihao’s picture

Status: Active » Needs review
FileSize
840 bytes

Here's the patch.

There's also a typo in a comment. It has no effect, but should it be fixed anyway for consistency?

Here's a grep for all "node_revision" occurrences:

http://drupalcode.org/project/workbench_access.git?a=search&h=refs%2Fhea...

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

Wondering why no one caught this before....

Anonymous’s picture

Thank you for the patch. Saved me a headache!

g76’s picture

patch worked for me, thank you:) . The workbench suite is incredible, thank you for all the hard work.

gmclelland’s picture

This worked for me. Thank you

Anonymous’s picture

Re: Wondering why no one caught this before....

It's amazing how things like this always sneak through now matter how much you test!

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

  3abf9a9..91e69dc  7.x-1.x -> 7.x-1.x
Anonymous’s picture

Thank you, agentrickard, for you constant support of the Drupal community!

zhangtaihao’s picture

agentrickard: Thanks for making time for this.

Status: Fixed » Closed (fixed)

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