original from #619352: Overlay: Fix redirects

Node admin form edit the node in a overlay, but not user edit page.

reproduce:
1. go to home page
2. click on "people" in admin_menu, opens overlay
3. click "edit" on a user in overlay, which open url like "user/1/edit?destination=admin/people%3Frender%3Doverlay"
4. edit the user info (i did a pic upload)
5. press save
6. being redirected to "admin/people?render=overlay"

Comments

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new1.92 KB

OK, using the principle that all pages which let you edit users in some way or another should be considered "pseudo-administrative", here is a patch.

This is in some way trickier than editing nodes, since if you are a site administrator, editing your own user profile (for example) might be done with a very different purpose than editing someone else's account. But I think the overall principle still makes sense.

(Note that with this patch, the correct theme will not show in the overlay - that requires #615138: Some pages display in the overlay in a non-adminstrative theme in order to work correctly.)

aaronbauman’s picture

Status: Needs review » Needs work

I don't have any experience with overlay module, but I've applied this patch with unexpected results.

I have a fresh 7.x-dev install from CVS with one user.
I tried to create a new user and edit the existing user.
I tested on 3 browsers in OSX.
In all 3 cases, no javascript errors are thrown.
For all 3 browsers the forms load properly in the overlay, but do not submit (see below).
I could not edit the existing user nor create a new user, ie. the values in the form are not written to the database.

Here are the specific behaviors:
Safari:
After clicking submit, browser shows "loading" status, then completes with no change to the page. The admin is left on the same form with no feedback.

Firefox & Chrome:
After clicking submit, browser shows "loading" status, then truncates the <body> element of the overlay. No further feedback is displayed.

casey’s picture

Status: Needs work » Needs review

issue indicated by aaronbauman is resolved.

yoroy’s picture

Issue tags: +Usability

tagging

manumilou’s picture

I tested the patch with the admin user and an authenticated user. I reproduced the steps described in #1 and the bug is still here. The edit account page does not open in overlay. As soon as I saved the user, I am redirected to the list of users in an overlay.

casey’s picture

You need to clear Drupal cache; it works perfectly fine.

ygerasimov’s picture

I have tested this patch. Works great after clearing cache.

tstoeckler’s picture

Since multiple people have tested this patch to work and the code looks good (and still applies) marking RTBC.
Don't know if this still needs a sign-off from yoroy (see #5) or not.

tstoeckler’s picture

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

Status: Reviewed & tested by the community » Fixed

Works! Committed to CVS HEAD.

Status: Fixed » Closed (fixed)
Issue tags: -Usability

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