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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amoebanath’s picture

During 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.

jamsilver’s picture

Project: » Drupal core
Version: » 7.26
Component: Code » overlay.module
Assigned: amoebanath » Unassigned
Status: Active » Needs review
amoebanath’s picture

Title: Submission of a custom form within the overlay results in infinite loop of submissions and reloads » Submission of a form within the overlay results in infinite loop of submissions and attempted drupal_goto

Version: 7.26 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.