I have been having a problem with the 'Continue & edit' button on admin/structure/views/add. The issue seems to be when a ?destination parameter is set (which is reasonable when on admin/structure/views/add), the form doesn't unset $_GET['redirect'] which ends up not saving the form and kicking the user back without saving or editing any view. Views should do something like core does like in node_form_delete_submit() or path_admin_form_delete_submit().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
799 bytes

Patch included for review and manually tested.

Dave Reid’s picture

Checked this does not need to be backported to 6.x-3.x.

merlinofchaos’s picture

Out of curiousity, in what circumstance are you getting to the add new view page with a destination set?

Dave Reid’s picture

I found it handy to append destination strings to local actions during local development. I have this in a custom module:

function custom_preprocess_menu_local_action(&$variables) {
  $link = &$variables['element']['#link'];
  $link += array('localized_options' => array());
  $link['localized_options'] += array('query' => array());
  $link['localized_options']['query'] += drupal_get_destination();
}
dawehner’s picture

Status: Needs review » Fixed

This seems to make sense, as the problem exist on all drupal forms. Just tested the patch and it worked as expected. Committed to 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.