Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | workbench_scheduler-use_attached_for_javascript_settings-2423685-1.patch | 745 bytes | chasingmaxwell |
Comments
Comment #1
chasingmaxwell CreditAttribution: chasingmaxwell commentedHere'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.
Comment #2
chasingmaxwell CreditAttribution: chasingmaxwell commentedHere's the issue for coding standards: https://www.drupal.org/node/2423707
Comment #3
mikemiles86Comment #5
mikemiles86Tested. Patch applies cleanly and fixes the outlined issue.
Comment #6
mikemiles86chasingmaxwell, Thanks for this. It will be included in the next release.
Comment #7
chasingmaxwell CreditAttribution: chasingmaxwell commentedGreat! Thanks, mikemiles86!