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())));
Comments
Comment #2
q0rban commentedComment #3
q0rban commentedComment #4
chris matthews commentedThe 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.
Comment #5
japerryDrupal 7 is no longer supported, closing.