If you use pay_node to append a form to an existing node, the form generated has a form_id of "pay_node". This posts a the URL /node/XX/pay when submitted. The callback handler for /node/XX/pay calls drupal_get_form('pay_node_pay_form', $node) which generates a form with form_id of 'pay_node_pay_form'.
The net result is that if you have an embedded pay form, no matter what you enter into it, when you click "submit" it leads you to a new copy of the form which is empty.
I'm not sure what the best fix for this would be, but as an interim this patch is working for me (although it obviously disables the ability to use themes):
--- pay_node.module 2010-11-01 18:13:52.000000000 -0700
+++ pay_node.module.new 2010-12-21 21:39:11.000000000 -0800
@@ -97,7 +97,7 @@
$node->content['pay_node'] = array(
'#type' => 'markup',
- '#value' => theme($theme, $node->pay_form),
+ '#value' => drupal_get_form('pay_node_pay_form', $node),
'#weight' => $weight,
);
}
Comments
Comment #1
Souvent22 commentedAny update non this one? I too am having the same issue.
Comment #2
Souvent22 commentedThis has to do with the $form['#action'] being set to sometimes a page that does not have a form. Looking through the code, I don't know why, in pay_form.inc, that the line has:
This should be done with $form['#redirect'], and NOT by setting the action as there is no guarantee that the form is on the page, and thus the form will NOT be processed. I can provide a patch for this, but I'd like to hear the reasoning behind this first. I also see it has been sometime since any commits have been made to this module.
Comment #3
allie mickamikedickey, Are you able to confirm that this is resolved in the git branch? I solved a related issue and can't confirm that this one is still happening.
Comment #4
allie mickaI'm pretty sure this got fixed and haven't seen any followup.