$node->workbench_moderation['published'] does not exist yet if a node is created as a draft and has not yet reached a published state. This causes an error when checking if $node->workbench_moderation['my_revision'] != $node->workbench_moderation['published'] in nra_workbench_moderation_node_revision_status().

The specific error is:

Notice: Undefined index: published in nra_workbench_moderation_node_revision_status() (line 108 of /sites/all/modules/nra_workbench_moderation/nra_workbench_moderation.module).

From what I am seeing, it looks like this is sort of a hack to determine if a revision was once published but is now in a draft state (ie: "Archived"). If that's the case, a simple checking of isset($node->workbench_moderation['published']) should be sufficient. If the published state exists but isnt current, then we can imply the draft has been archived.

Comments

saltednut’s picture

Status: Active » Needs review
StatusFileSize
new1.32 KB

Here is a patch for your review.