After upgrading from 6.x-1.0-rc3 to 6.x-1.1 workflow form on node edit form is not working correctly. First for users that have permission to change workflow state part of workflow fieldset on node edit form is missing. When doing node form submit I am getting next error:

warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/ivicap/moje/bin/xampp/htdocs/natropolis.montenasoft.com/sites/all/modules/workflow/workflow.module on line 270.

After some investigation I found that $name value is not initialized for workflow_node_form call on line 470 in workflow.module. Checking diff of varius version between rc3 and 1.1 reveals that line 431 in revision 1.74 is deleted in 1.75 (diff link)

$name = check_plain(workflow_get_name($wid));

After returning erased line in 6.x-1.1 everything is working correctly.

Am I having some upgrade problem here or is this a bug because $name is not initialized?

Comments

jvandyk’s picture

Status: Active » Closed (duplicate)
Parkes Design’s picture

pivica many thanks for your solution... this was driving me nuts. I wonder why this is still in patch form and not rolled out into the release version?

pivica’s picture

Status: Closed (duplicate) » Fixed

Just checked latest workflow release (Workflow 6.x-1.3) and $name is now initialized with empty string. With this change it seems everything is working ok. Marking this fixed.

Status: Fixed » Closed (fixed)

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