I just noticed that content profile redirect back to the user profile view after editing it.
-> I'm referring to:

  elseif ($form_id == 'user_profile_form') {
    $form['#redirect'] = 'user/'. $form['_account']['#value']->uid;
  }

I don't think it's a good idea to change the core behaviour here. Suppose you have 3 tabs and you want to edit them, then it's quite inconvenient if you are redirected to the user view page after you have edited a single subtab? Isn't it?

Comments

ferdi’s picture

StatusFileSize
new771 bytes

this also prevents you from deleting a user using the user edit form. Here is a fix.

andreiashu’s picture

StatusFileSize
new1.46 KB

I totally agree with fago: When i edit a subtab (or when i am on the main user edit page), after saving the changes I should be redirected back to the same url.
I attached a patch. Please note that the patch also includes a fix for #337136: improve docs to mention auto nodetitle - the same foreach loop is needed for both bugs so i had to merge them.
Tell me what do you think.

andreiashu’s picture

Status: Active » Needs review

Forgot to change the status.

fago’s picture

Status: Needs review » Fixed

ok, I've just removed those lines.

@patch: I know it's sometimes difficult but please only provide separated patches.

andreiashu’s picture

Will do that from now on :)

gavri’s picture

Category: bug » feature
Status: Fixed » Active

Why don't let the admin / developer to decide to where the user will be redirected.
by using the $form['#redirect'] you're preventing from other modules (and especially. the custom website module) to use the $form['#redirect'] in its' form alter hook (you can't tell what redirection will act first by the hook system).

for example - suppose i want to use the content_profile tabs as a wizard (something like the old pageroute functionality) - when submitting the form i want to be redirected to the next content_profile tab.
correct me if I'm wrong but in the current state of things i can't do that.
so my suggestion to make somehow this redirection optional.

fago’s picture

Category: feature » bug
Status: Active » Fixed

hm, I think doing so by setting $form['#redirect'] is the best way to do so for content profile - I can't think of a good alternative so this has to stay.

Anyway you can still do custom redirects, e.g. the rules module comes with a page redirect action you can easily use to customize the redirect.
Furthermore pageroute for 6.x is arriving.. The beta still has some bugs, but they should be fixed soon. There is also already a content profile patch in the queue. So feel free to test, probably best with the next pageroute beta.

Status: Fixed » Closed (fixed)

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