Workflow_access does not submit
mfredrickson - April 18, 2006 - 00:25
| Project: | Node Access Arbitrator |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi-
I'm trying to learn about this system via the workflow_access module. I'm having trouble, however, getting the form to submit. I've added a few checks to the code, and it seems the workflow_access_form_submit is never called.
Can anyone reproduce?
Can anyone point me to a reference that explains what this block of code is doing (I suspect it of being buggy, but that it is probably just because I don't understand it):
<?php
$form['#submit']['workflow_access_form_submit'] = current($form['#submit']);
$form['#submit']['workflow_access_form_submit'][0] = 'workflow_access_form_submit';
?>
#1
The submit is never called because it unfortunately relies on a patch that jvandyk hasn't had time to apply.
workflow incorrectly does a drupal_goto() in it's _submit hook rather than returning the location to goto, which short-circuits the whole submit process. Look in the workflow queue for my patch, apply that, and it will work.
(That chunk of code with the 'current' is providing the custom submit hook with a reference to $form_variables which exists on the *existing* submit hook that forms api put there, and that was the shortest piece of code to retrieve it that I could think of)
#2
I'm closing this as the problem is workflow's, not yours.
Thanks.