On the node edit page, if validation fails, on the resulting page I receive the following JavaScript error:

TypeError: Cannot read property 'schedules' of undefined

This is because drupal_add_js() is used to add the schedules setting instead of the #attached property in workbench_scheduler_form_node_form_alter(). I'll be attaching a patch shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chasingmaxwell’s picture

Here's a patch. The submitted patch follows the coding standard conventions already in place in the rest of the file. However, a separate issue should be created for addressing coding standards issues.

chasingmaxwell’s picture

Here's the issue for coding standards: https://www.drupal.org/node/2423707

mikemiles86’s picture

Assigned: Unassigned » mikemiles86
Status: Active » Needs review

mikemiles86’s picture

Assigned: mikemiles86 » Unassigned
Status: Needs review » Reviewed & tested by the community

Tested. Patch applies cleanly and fixes the outlined issue.

mikemiles86’s picture

Status: Reviewed & tested by the community » Fixed

chasingmaxwell, Thanks for this. It will be included in the next release.

chasingmaxwell’s picture

Great! Thanks, mikemiles86!

Status: Fixed » Closed (fixed)

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