Hi,
to use $_GET['destination'] as $path-parameter in confirm_form() is buggy, if there is a query parameter at the destination (e.g. "home?mode=4"). In this case, the Cancel-link of the confirm form des not work and redirects you to the page-not-found-page.

Usecase: you integrated any stream via a block at frontpage and you want to delete a message.

There are several place in heartbeat_comment-module with the same problem.

propable solution:

The $path parameter of confirm_form() can be given as an array with a query string and fragment. (see here)

So you have to split $_GET['destination'] into its parts before calling confirm_form(). The easiest way is to implement drupal_parse_url(), which is only available for drupal 7, in heartbeat 6.x.
This function should do all we need (see here)

Comments

TS79’s picture

Title: $GET['destination'] buggy as path in confirm_form() » $_GET['destination'] buggy as path in confirm_form()
TS79’s picture

Issue summary: View changes

$GET['destination'] became $_GET['destination']