Seems like drupal_set_message or the user.module is the culprit here.
Whenever someone registers a new account, or resets their password, they are just taken back to the homepage or to the login page, but no status message is displayed.
Extremely annoying since my users dont know what is going on.
Im running drupal on php 4 red hat setup.
Modules of interest installed: devel, invite (disabled), loggintobbagin, buddylist, captcha, and a few custom modules.
I thought logintobbagin was the culprit so i uninstalled it but no dice.
Please let me know if you need anymore info..
Thanks
Comments
Comment #1
Ezhil_Valan commentedi'm also having the same issue
when "send email" is clicked in the contact module:
status messages like "the message has been sent" is displayed while logged in as administrator
such status messages are not displayed while logged in as anonymous user
code excerpt from "page.tpl.php" which prints messages:
/*************************************/
/***********************************/
code excerpt from "contact.pages.inc" in contact module :
/***********************************************************/
function contact_mail_page_submit($form, &$form_state) {
....
drupal_set_message(t('the message has been sent.'));
....
}
/**********************************************************/
when "send email" button is clicked, "subject" and "message" entered in the contact module is sent to the appropriate email id. but the status message "the message has been sent" is not displayed while logged in as anonymous user.
plz help me to solve the aforeseen issue.
Comment #2
kenorb commentedTry to set on admin/user/logintoboggan some 'Redirect path on Registration' (i.e.: 'node') and check if message will appear.
I think there is some problem in logintoboggan_user_register_submit(), when redirect is empty, it's not showing any messages.
It's the same problem on 6.x.
Comment #3
hunmonk commentedi've tested this issue with both immediate login turned on and off, and with no path and with a path entered in 'Redirect path on Registration' -- everything works as expected as far as i can see.
perhaps there's another contrib module causing issues here...
Comment #4
kenorb commentedSo we should find out what's the reason and which version is affected with combination with which module and fix that.
Because there is some relation of LoginToboggan, because if you set some: 'Redirect path on Registration' to 'node', it's working fine, if you leave this empty, it's not working.
I can try to debug that later and find out.
P.S. Please don't mark the issues as Close from Active state, because non of the users will receive notification of changes of this issue.
Comment #5
kenorb commentedProbably this issue also mess up with permission, but I'm not sure.
When user register (using content_profile + view_own), this user have no permission to his own profile (even proper permission is set).
Probably it's redirecting before it can execute node_access_acquire_grants() for this node.
Comment #6
kenorb commentedBacktrace:
autoassignrole_path -> drupal_get_form('user_register') -> drupal_process_form() -> form_execute_handlers() -> logintoboggan_user_register_submit()
Comment #7
kenorb commentedIn one of my case the was problem that user with uid = 0 was not in my database (users table). Something removed it from users table and Drupal couldn't load the session.
Related topic:
How can I restore UID 0 - http://drupal.org/node/262669
Related issue to missing uid 0:
#293508: CAPTCHA doesn't work: no uid=0 in users table
Comment #8
hunmonk commentedComment #9
kenorb commentedIt's not solved yet, there is some problem and it should be fixed in proper way.
Some module is modifying uid 0 and sometimes it's removing it.
Comment #10
hunmonk commentedthis is not a LoginToboggan issue, therefore it is fixed as far as i'm concerned. if you discover which module it is, then feel free to reopen the issue under that module's issue queue.
Comment #11
alextronic commentedin that case it should be CLOSED, not FIXED, right?
Comment #12
hunmonk commented@alextronic: the system will automatically close issues marked as fixed if they haven't been updated in two weeks. this allows people to see the issue in default listings for a bit before it disappears into the closed state.
Comment #13
eddy147 commentedWe've had exactly the same problem. Seemed that user 0 was missing.
And set uid=0 for this user after that, because it's an autoincrement.
No idea how that messes up with drupal_set_message exactly. Because when printing the $_SESSION['messages'] variable, by using var_dump just after the drupal_set_message call in user.module's user_registration_form_submit() function, it showed the right messages which drupal_set_message could not show.
I wonder, is there a function in drupal that actually *prints* the output from drupal_set_message? There must be the logic.
Anyway, it's solved for us. Hopefully helped you too. Very very frustrating bug this was.
Comment #14
eddy147 commentedComment #15
alextronic commented@eddy147
Try:
<?php if ($messages): print $messages; endif; ?>Or:
<?php print theme('status_messages'); ?>...anyway, I have created user uid=0 and still no joy. Ouch.
Comment #16
hunmonk commentedagain, this is not an LT issue. moving to what seems like the most appropriate queue.
Comment #17
alextronic commentednow you're right
Comment #18
kenorb commentedComment #19
halfabrain commentedHello all
I found this thread through google - agree it's not a Login Toboggan problem as I don't use that module. Hummonk, I wasn't sure what queue you had moved this too; so in case people are still in their early days of finding their way through Drupal I'm throwing in my tup-pence worth...
I did some more digging around Drupal and found the solution in these two threads:
http://drupal.org/node/217607
http://drupal.org/node/262669
For me, in my Users table I actually had the UID of 0, but in my user_roles table I was missing the UID of 0 having the RID of 1.
I'm setting this to fixed now too as it isn't a login toboggan specific issue.
Cheers
Halfabrain
Comment #20
kenorb commentedThat's why issue has been moved to Drupal bugs, but anyway it's not fixed as a bug.
Something removed that row from db which should be there and if somebody will find the reason, he can re-open.
Comment #22
Marat commentedI have the same problem after moving the database. My situation is similar to yours, I have the UID of 0 for the users table but not for user_roles one. I inserted a new row with UID = 0 and RID = 1 in user_role table. However, the problem is not solved and still no status message is displayed. Any other idea?
Comment #23
kenorb commentedDuplicate of: #204411: Anonymous user id breaks on MySQL export/import (xID of Zero get's auto-incremented on external xSQL events)
Other related:
#243423: User with uid=0 will change uid when copied/inserted to {users} table with MySQL and MyISAM table, breaks anonymous postings
Comment #24
muhammad.tanweer commentedIn my case, adding an entry for uid 0 in the users table worked. Now the error messages are showing correctly.
Muhammad
www.app-desk.com