What sort of fix is needed to make Drupal Search work correctly on a civicrm page such as an Event or Contribution page
This can be reproduced on CiviCRM.org, which has both a search block and contribute pages.


Go to https://civicrm.org/civicrm/contribute/transact?reset=1&amp;id=1&amp;action=preview
Type "ponies" in the Drupal search box (top right)
Hit ENTER and see fairly misleading error messages.




I haven't looked into it in depth, but I'd guess something like this:


Drupal's Block Search form uses the current page callback to submit its form to.
CiviCRM intercepts form submissions to /civicrm/*, but can't handle form submissions in unexpected formats, so doesn't know what to do.
Yellow Page of Malaise. (A play on WSoD here.)


My suggested dodgy workarounds are:


Add a form alter hook in CiviCRM, which identifies forms you use throughout the site and direct the form submit URLs elsewhere if the path contains /civicrm, OR
Do not show those blocks on those paths at all.


My wild clever idea solution is:


Make CiviCRM return Fatal errors using Drupal page callback rather than bombing out to the YPoM. This might permit Drupal to then do whatever redirect happens as part of the normal flow for Drupal forms.


My fantasy perfect solution is:


Destroy all HTML QuickForm.


This last is happening, albeit slowly. Please donate to CiviCRM, avoid implementing new functionality in QuickForm, and support any efforts to remove QuickForm or improve the codebase which you are able to.