Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Applies to Drupal Core 5.12
I have discovered that setting a trigger and action to redirect a user to a specific page after registration is causing activation emails not to be sent. Users can't login after signing up.
Is this a known issue? Is there any reason why this would happen?
I hope this is the right place to file such a bug.
Comments
Comment #1
gav240z CreditAttribution: gav240z commentedNo response, at all? Is this not a core module?
Comment #2
Heine CreditAttribution: Heine commentedNo this is not a core module. (There is a 6.x Action module in core).
Make the weight of the actions module higher in the systems table (UPDATE system SET weight = 10 WHERE name = 'actions') to work around this problem;
Ceterum censeo... ending a request during hook execution is a sin.
Comment #3
gav240z CreditAttribution: gav240z commentedOk thanks, will give this a try.
Will make database backup first though.
Comment #4
gav240z CreditAttribution: gav240z commentedNope didn't work, still didn't get email. Only received email after requesting new password.
Clearly its bypassing the send email phase and just going to the redirected url instead :(.
Comment #5
jvandyk CreditAttribution: jvandyk commentedSee http://drupal.org/project/login_destination
Comment #6
jvandyk CreditAttribution: jvandyk commentedThe short answer to what is happening is that in Drupal 5, the submit handler for the registration form calls user_save() to create the new user. user_save() fires the hook. Then when user_save() is done, execution goes back to the submit handler which sends out the email. So if you are assigning an action to run that does a drupal_goto() when user_save() fires the hook, execution never gets back to the submit handler and thus the email is never sent.
You might also check out http://drupal.org/project/logintoboggan
Comment #7
gav240z CreditAttribution: gav240z commentedYeah I tried login toboggan but it seemed like overkill for my needs. I honestly didn't want to depend on yet another module if I didn't need it.
It basically means I need to re-theme my login box and make other changes to the site.
Does the same problem occur in Drupal 6? I have been thinking of moving my site over to D6 since CCK and Views is now out for D6.
Comment #8
gav240z CreditAttribution: gav240z commentedOk Login Toboggan fixed the issue for me. I do like some of the features login toboggan addresses, but I still think the above issue is a bug and not expected behaviour.
How do I go about submitting this issue further?
Can anyone confirm if the same issue exists in Drupal 6?
Comment #9
yaHappyDrupUser CreditAttribution: yaHappyDrupUser commentedBTW, Im using Drupal 6.11 and have this problem. To reiterate and for search purposed for other users who may be having trouble finding help: I enabled a trigger to set off a created action that performs a direct to url for a new page i created that say's you have submitted your registration... we sent you an email... yada yada! When a user registers, the temporary account, which is waiting for verification click through from the sent templated email, is created. The email is ready to be fired off. ONce, the registration is for a new account is submitted, the redirect to url.. thanks for registerring does indeed occur. Heres the problem though. The programming logic never gives back control to the emailer which should be run to shoot the email off to the new candidate user. So an account is sitting in the database waiting to be finalized and the receiver left looking for an email that is never coming! haha. Hey you gotta laugh sometimes. I'd get in and get dirty with some php, but I don't have time. I hope this is fixed soon. I'm going to get the module since I hear it fixes the problem. However this needs to be fixed and if I get time, I intend to make a patch for this that calls the templated email emailer function, once the redirect is finished. I thin kthat will fix it. Any developers read this, please this problem is important and beggin for attention. I got a feeling its a quick fix.
Comment #10
weseze CreditAttribution: weseze commentedI've had a similar problem and fixed it with the standard functionality.
My scenario:
After a registered user made a new post I wanted to redirect them to a node showing all their posts instead of the node they just created.
I created an action that goes to an internal Drupal path (node/x) and then set a trigger on node creation to execute this action.
The redirect worked just fine, but the node wasn't saved properly. Half of the fields were not posted, permissions were wrong, ...
The fix:
Before triggering the redirect, I set another trigger to save the node. Everything works fine now.
I'm guessing that you could do something similar with a user registration. Eg saving the user before redirection or something similar.
Comment #11
Francewhoa@gav240z: I can confirm this issue with Drupal 6.12.
Comment #12
jasperdc CreditAttribution: jasperdc commented@Onopoc: I've got the exact same problem in Drupal 6.13
Comment #13
ari-meetai CreditAttribution: ari-meetai commentedConfirmed in Druapl 6.13. Seems a problem in the Trigger module, instead of the Actions one, though.
Comment #14
FrancewhoaConfirming that this issue is present in Drupal 7.x dev version too. I opened another issue at http://drupal.org/node/560150
Maybe when fixed with Drupal 7 it could be back port to Drupal 5 & 6?
Comment #15
csc4 CreditAttribution: csc4 commentedI'm looking at something similar and wondered if there's a connection with System action (email) triggered by workflow failed because the $node object was not set properly which has a proposed patch in the workflow issue queue from January.
Comment #16
vitis CreditAttribution: vitis commentedsub
Comment #17
josuealcalde CreditAttribution: josuealcalde commentedsubscribe
Comment #18
Will Igetit CreditAttribution: Will Igetit commentedsub
Comment #19
Pomliane CreditAttribution: Pomliane commentedThis version of Actions is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.