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.
When there is a custom block shown in the overlay, and that block contains a form, and that block is also present in the page beneath the overlay, submitting the custom block form within the overlay results in multiple form submissions.
Comment | File | Size | Author |
---|---|---|---|
#1 | core-overlay-post-on-reload-fix-D7.patch | 782 bytes | amoebanath |
Comments
Comment #1
amoebanath CreditAttribution: amoebanath commentedDuring each CHILD page load, overlay module's hook_exit() implementation manually renders the PARENT page. However it does not take measures to withhold POST data. As such, if a certain form appears on both PARENT and CHILD pages and is submitted in the CHILD, the form submit handlers are executed AGAIN during overlay_exit(). This, in turn, causes a call to drupal_goto() which, in turn invokes hook_exit()...
The reload loop can be prevented by holding back the $_POST data while the page is being refreshed.
Patch attached.
Comment #2
jamsilver CreditAttribution: jamsilver commentedComment #3
amoebanath CreditAttribution: amoebanath commented