Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Needs review
FileSize
826 bytes

Here is the patch.

pebosi’s picture

Patch worked for me. Thanks.

tanc’s picture

Confirmed patch in #1 works nicely.

tanc’s picture

Status: Needs review » Reviewed & tested by the community

Just another note to say I've just re-patched an admin module with dereine's patch in #1 and it's working fine. I've marked this as reviewed but maybe I'm overstepping the mark so forgive me if this needs more testing.

jfrederick’s picture

This patch still works great as of 10/11/12 with devel 6.x-1.27.

Cisse’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Issue summary: View changes

I had this issue with Drupal 7.31 and Admin 7.x-2.0-beta3+8-dev. You can also apply this change and it will work perfectly:

-    $panes['switch_user']['user']['#submit'] = array('devel_switch_user_form_submit');
+    $panes['switch_user']['user']['submit']['#submit'] = array('devel_switch_user_form_submit');
   }
   if (user_access('execute php code')) {
     $panes['execute'] = devel_execute_form() + array('#title' => t('Execute PHP'));
jacob.embree’s picture

FileSize
610 bytes

What are the steps to reproduce this? I have seen the user switcher fail silently before, but it may have been with an older version of Devel or Admin. I can't reproduce now on Drupal 6 or 7.

I am not convinced that this patch is necessary because I think since there is only one submit button it shouldn't matter whether the submit callback is added to the form or the submit button. However, a reroll is attached because the other one didn't apply.

jacob.embree’s picture

Status: Reviewed & tested by the community » Needs review
mikelutz’s picture

I have never seen the switch user form work in the admin bar, and while I made the change manually versus trying the patch, I can confirm the change solves the problem.

I could always switch to the users that were listed in the block, since those were direct links to devel/switch/[username], but the form where you type in a user has always failed for me until I apply this change.

jacob.embree’s picture

Status: Needs review » Closed (outdated)
Related issues: +#3020764: Devel blocks do not submit

A change in Devel makes this patch no longer work.
#2448063: Add #actions container to submit buttons.
I opened #3020764: Devel blocks do not submit to fix more than just the user switch block.