Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello
I am using content profile module for user information. I have many cck fields for the user content type. also some of the fields has been showup on the user registration form.
After I enable this login destination module. all the user information which user has been put in form when they register on the site aren't save at all. after they login the site. all the fields are still empty. the field infor won't be save.
Comment | File | Size | Author |
---|---|---|---|
#32 | login_destination_form_redirect_user_761254_0.patch | 4.9 KB | sbilde |
#31 | login_destination_form_redirect_user_761254.patch | 4.79 KB | sbilde |
#30 | login_destination_form_redirect_user_761254.patch | 4.79 KB | sbilde |
#27 | login_destination_form_redirect.patch | 4.67 KB | mithy |
#13 | remove_drupal_goto.patch | 660 bytes | hefox |
Comments
Comment #1
freelylw CreditAttribution: freelylw commentedThe problem still exist in the latest dev version.
Comment #2
3CWebDev CreditAttribution: 3CWebDev commentedHave you verified that login destination is causing this? Please be sure to disable the module and test the workflow again to see if the problem persists. Post you results back here.
Comment #3
freelylw CreditAttribution: freelylw commentedHi, yes, once I disable the this module, the problem gone, I have try twice, its the same . so I am 100% sure is the problem of login destination.
Comment #4
3CWebDev CreditAttribution: 3CWebDev commentedI have tested and confirmed a conflict with the Content Profile module.
Comment #5
3CWebDev CreditAttribution: 3CWebDev commentedThe conflict is between login_destination.module and content_profile_registration.modul -- login_destination uses drupal_goto to redirect upon user logins via hook_user, and content_profile_registration uses hook_user_register_submit to save content profile fields. It appears that hook_user_register_submit is not being called after the drupal_goto redirect.
I have tried various work-arounds but have not been able to find a viable solution to fix this conflict and am open to suggestions.
Comment #6
stevenghines CreditAttribution: stevenghines commentedI'm having the same problem with the MailChimp module (see #685352: Mailing list registration not working for registered users), i.e. the Login Destination implementation of hook user was getting executed before the mailchimp_subscribe_auth_form_submit submit handler was being executed.
After having done a bit of digging around I found a post at #277512: Using drupal_goto in form submit handler prevents the use of multiple submit handlers which seems to support setfree's comment about drupal_goto made in #5. Unfortunately I have no workaround to offer up yet. I'm going to try the Login Toboggan module to see if that gives me the same functionality without breaking MailChimp as I have a deadline to hit but if that fails, I'll come back to this and do some more investigation.
Is there some way of forcing the login_destination_user to be the last one run? Maybe something to do with module weights? I'm at the limits of my Drupal knowledge here so these are just guesses.
Comment #7
geoffreyr CreditAttribution: geoffreyr commentedI've also noticed that Login Destination's redirect behaviour conflicts with Services module, in particular the user.login service.
Setting the weight of Login Destination higher than MailChimp, Content Profile and Services, or indeed whatever module is having problems may be the most effective solution to this.
Comment #8
Rene Hostettler CreditAttribution: Rene Hostettler commentedI can confirm the conflict between login destination and use content profile on registration. Content profile is not created when login destination latest stable version 2.10 is enabled.
I tried changing the login destination weight to 9999 in the systems table but that didn't resolve the issue.
I have rolled back to login destination 2.5 which dosn't have this bug.
Comment #9
jocken CreditAttribution: jocken commentedWhy not rules-module for this kind of action?
Comment #10
locomo CreditAttribution: locomo commentedsubscribe
Comment #11
greenbeans CreditAttribution: greenbeans commented@stevenghines -- did LoginToboggan work better for you?
Comment #12
estrar CreditAttribution: estrar commentedLogin toboggan worked for me,
Comment #13
hefox CreditAttribution: hefox commentedTMK, there really no reason to call drupal_goto on a form submission other than to break the current process, as there's already a drupal_goto at the end of the form submission. It was already setting the $_REQUEST['destination'] so that should be enough. (Though, I think it should make sure destination is not already set, but that's another issue).
Comment #14
kiwad CreditAttribution: kiwad commented@jocken Something like "User has logged in" Then "Load content by id" ?
Comment #15
renyi CreditAttribution: renyi commentedA similar post in Content Profile .. http://drupal.org/node/485284
Comment #16
916Designs CreditAttribution: 916Designs commentedCan do this with the Rules Module instead...
ON User has Logged In
DO Page Redirect
You can even write an "if" condition in rules to prevent the redirect from happening. E.g. to prevent people from skipping the Ubercart checkout complete page, an if condition:
Sorry if off topic.
Comment #17
abhishek.kumar CreditAttribution: abhishek.kumar commentedThanks for the remove_drupal_goto.patch this works for me.
Comment #18
Rene Hostettler CreditAttribution: Rene Hostettler commentedThanks can confirm patch works for me as well on 2.10
Comment #19
TmaX-2 CreditAttribution: TmaX-2 commented#13 made it work though i have content profile module..
do remember to uncheck "Return user to where he/she came from. (Preserve destination)"
if you want the user to go to a custom page...
cheers
Comment #20
mugunth CreditAttribution: mugunth commentedI find this works correctly when the latest version is 6.x-2.12 .
However I noticed, it doesnt work if we have triggers/actions enabled for user login action.
Comment #21
arski CreditAttribution: arski commentedguys, you know that the patch has been committed already? so "needs review" is kind of a pointless state.. basically it should be "fixed", and reopened to "active" if anybody is still encountering an issue :)
(I was just about to apply the patch myself when I found out that it was already.. a little confusing this :))
Comment #22
hefox CreditAttribution: hefox commentedLooks like it was commited with http://drupal.org/cvs?commit=442738, but the issue wasn't updated. (My guess is people don't check the CVS repo when there's an active issue).
Yay it's commited!
Comment #23
Balbo CreditAttribution: Balbo commentedI'm confused. Is the conflict still there?
Comment #24
mithy CreditAttribution: mithy commentedChanging from calling drupal_goto() to setting the $_REQUEST['destination'] withdraws the possibility to redirect to an external URL. That is because of the goto implementation that does not allow for an url to be passed by the destination variable. Though in my opinion it is better to have the compability over feature-richness. Hacking the form and making it pass the url directly to the the form goto may be a way to go but haven't tried yet.
Comment #26
mithy CreditAttribution: mithy commentedI have changed the way of handling redirect to something similar to how it is advised in drupal documentation (http://drupal.org/node/134000) - by setting the $form['redirect'] variable. However because the submit function in user module overrides it, I had to add a custom submit handler instead and set the redirect in it.
It brings back the support for external URL's and it looks to me like a better method of handling redirects.
Comment #27
mithy CreditAttribution: mithy commentedAnd the patch.
Comment #28
Anonymous (not verified) CreditAttribution: Anonymous commentedApplied patch to 6.12. External URL works now.
Comment #29
sbilde CreditAttribution: sbilde commentedIn the $form_id switch at line 174, I guess the user_register is missing. When a user is redirected to the drupal site, from an external site along with a destination-parameter like:
link from external pointing: "www.drupalsite.com/user/register?destination=http://www.external.com/whatever"
I have tested with the 'user_register'-case, and seems to function well. Trying to apply the patch..- Coming up :)
Comment #30
sbilde CreditAttribution: sbilde commentedThe updated patch.
Comment #31
sbilde CreditAttribution: sbilde commentedtrying again..- sorry can't delete the other.
Comment #32
sbilde CreditAttribution: sbilde commentedComment #33
rsvelko CreditAttribution: rsvelko as a volunteer commented@all: Today I've setup the content_profile 6.x-1.0 and login_destination latest git dev on a drupal core 6.37 I tested with one custom content_profile field and registering a new user . The redirect worked ok!
Tested with static-url/php-url/redirect-back-to-where-they-were - all works!
I guess some parts/ similar code to the above patches's logic has been commited since 2012.
So marking this one too as fixed. With relief and apology for the long delay!
Comment #34
rsvelko CreditAttribution: rsvelko as a volunteer commentedI found out what fixed it: somebody in 2010 commented out the drupal_goto usage in the redirect, leaving only upto the destination parameter.
Recently I made it possible to choose whether to use drupal_goto. It is off by default, covering this issue's case and all works here.