In ctools_export_ui_edit_item_form_delete(), cancel_path is passed as an option to drupal_goto():

  $path = $form_state['item']->export_type & EXPORT_IN_CODE ? 'revert' : 'delete';

  drupal_goto(ctools_export_ui_plugin_menu_path($form_state['plugin'], $path, $form_state['item']->{$export_key}), array('cancel_path' => $_GET['q']));

In addition, $_GET['q'] is used for the value of this parameter instead of an API function like request_path(). I'm assuming the intention here is for cancel_path to be a query argument, not an option passed to drupal_goto(), and thus the code should perhaps look like this?

  $operation = $form_state['item']->export_type & EXPORT_IN_CODE ? 'revert' : 'delete';
  $path = ctools_export_ui_plugin_menu_path($form_state['plugin'], $operation, $form_state['item']->{$export_key});

  drupal_goto($path, array('query' => array('cancel_path' => request_path())));
CommentFileSizeAuthor
#2 ctools-2558075-fix-cancel-path-1.patch1.33 KBq0rban

Comments

q0rban created an issue. See original summary.

q0rban’s picture

StatusFileSize
new1.33 KB
q0rban’s picture

Status: Active » Needs review
chris matthews’s picture

The 3 year old patch in #2 to ctools_export_ui.class.php applied cleanly to the latest ctools 7.x-1.x-dev and if still applicable needs to be reviewed.

Checking patch plugins/export_ui/ctools_export_ui.class.php...
Hunk #1 succeeded at 1410 (offset 9 lines).
Applied patch plugins/export_ui/ctools_export_ui.class.php cleanly.
japerry’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.