CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Drupal account not being created via profile contribution page
Pages: [1] 2 3

Author Topic: Drupal account not being created via profile contribution page  (Read 10444 times)

reynog

  • Guest
Drupal account not being created via profile contribution page
June 24, 2008, 03:11:50 pm
I am working on getting our organization onto CiviCRM and so far things are going relatively well... however, I seem to have hit a snag on something that seems like it SHOULD work, but isn't.  I suspect that I have some setting somewhere slightly off, but I can't seem to figure out where the problem is.

I have a CiviCRM Profile created called "Member Profile"...
Used for: View/Edit User Account
Drupal user account registration option? CHECKED
Update contact on a duplicate match? CHECKED
This profile does include the Primary Email Address and it is required.

Then I have a Contribution Page called "Member Registration", that includes the above profile.

I have a bunch of contacts existing in CiviCRM.

When I access the contribution page as an anonymous user, fill in an email address that matches one of my existing CiviCRM contacts, select the "Create an account?", and submit the form, it says it is successful... however, no Drupal user is created with the username I entered. I also do not get an email at the primary email address indicating that an account has been created.  It does update the CiviCRM record correctly.

If I add a Drupal user account manually as an administrator, it does find the matching CiviCRM contact correctly and associates it with the Drupal user account.  So I know that the contact matching rules are working.

Lastly, on the User Settings page, I have the following settings enabled:
Visitors can create accounts and no administrator approval is required. CHECKED
Require e-mail verification when a visitor creates an account CHECKED


I've been through all of the wiki that seems at all related, and searched the forums and haven't come up with any answers that I haven't already setup (as described above).  Are there any tricky areas that I'm missing here?

Maybe something in the Drupal ACL that I have set incorrectly?  I can also post what I have set for certain modules if that would be helpful.

This seems like such an obvious task, but it's just not working as expected.

This is CiviCRM 2.0.3 on Drupal 5.7

Thanks for any help!


EDITED TO ADD:
I tried this on http://drupal.demo.civicrm.org.  I set up all of the CiviCRM details identically... when I submitted the Contribution Page, it did creat the Drupal user account correctly. So, it looks as though the problem must be outside of CiviCRM, somewhere in the Drupal settings (as I suspected).  However, I can't compare any of the Drupal settings with my own because I don't have Drupal admin permissions.
« Last Edit: June 24, 2008, 08:44:18 pm by reynog »

reynog

  • Guest
Re: Drupal account not being created via profile contribution page
July 01, 2008, 02:01:50 pm
Checking back here a week later... I was sure hoping someone would have some ideas for me!  I still have not been able to get this to work in my environment.

Can anyone point me to some possible configuration areas to further explore?  Or is there some way I can get Drupal admin access on the sandbox so that I can poke around and look for differences myself?  I REALLY need this functionality, and I have no idea what the defaults are where I've changed things.  I would so appreciate any tips or ideas.  Again, everything is working except for Drupal profile creation via the contribution page.

Thanks, again...


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal account not being created via profile contribution page
July 01, 2008, 02:48:50 pm
The settings in the user settings  (q=admin/user/settings) for drupal.demo are:

1. Visitors can create accounts and no administrator approval is required. (public registrations radio button)

2. Require email verification checkbox checked

(which is the same as you have)

your best bet would be to add some debugging code to the function createDrupalUser (line 414) in the file CRM/Core/BAO/CMSUser.php and trace the code from there

lobo
« Last Edit: July 01, 2008, 03:32:55 pm by Donald Lobo »
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

DaraghOBrien

  • Guest
Re: Drupal account not being created via profile contribution page
July 25, 2008, 06:32:40 pm
Lobo,

I'm having the same difficulty. Email receipts are issuing from Civicrm for the contribution/membership sign up but the account isn't being created in Drupal. The username isn't even listed in the user list in Drupal.

I've granted permissions to anonymous users to see contribution pages and also to see civimember (in case that helped). I turned on the civicrm debugger but it didn't throw up anything.

I'm running Civicrm2.0.5 on Drupal 5.7 with drupal and civicrm in seperate databases.


DaraghOBrien

  • Guest
Re: Drupal account not being created via profile contribution page
July 26, 2008, 06:36:48 am
http://issues.civicrm.org/jira/browse/CRM-2471 seems to describe the same issue from way back.

My drupal installation is sending out emails etc. fine when I register as normal. The CiviContribute method though isn't triggering.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal account not being created via profile contribution page
July 26, 2008, 11:49:13 am

daragh:

your best bet would be to add some debugging code to the function createDrupalUser (line 414) in the file CRM/Core/BAO/CMSUser.php and trace the code from there. Seems like there may be some other drupal settings that are preventing this from happening which we are unaware of and is potentially site specific (since it does work on sandbox/drupal)

Would be good for us to track down the problem and fix it

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

DaraghOBrien

  • Guest
Re: Drupal account not being created via profile contribution page
July 27, 2008, 10:49:46 pm
Lobo,

As I'm not particularly skilled in PHP could you provide sample debugging code that I could use to help track this?

Daragh

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal account not being created via profile contribution page
July 27, 2008, 11:42:53 pm

hey daragh:

this issue is a wee bit more complex since its between the drupal / civicrm layer. If you are not comfortable with PHP this is probably not a good issue to debug.

That said, one way of doing things is to put enough debug statements to give you a idea of whats happening where. You can call:

Code: [Select]
CRM_Core_Error::debug( $message, $var );
exit( );

and track things down. Just ensure you only have one exit statement (since the code stops immediately)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

DaraghOBrien

  • Guest
Re: Drupal account not being created via profile contribution page
July 28, 2008, 02:39:21 am
Lobo,

I'd rather try to contribute to the fix on this than sit on my hands on the sideline. Worst case scenario I get no information (because I'll do the prudent thing and back up the files first so I don't totally screw up my install  ::) )

Daragh


DaraghOBrien

  • Guest
Re: Drupal account not being created via profile contribution page
July 28, 2008, 03:17:57 am
Lobo,

Below is the backtrace result I got (not sure if I did things correctly). Backtrace popped up when I tried to log back in as admin to see if things worked out.

If it helps track down the root cause, I'm willing to let you have access to the backend of my site to do 'in the field' diagnostics on the issue. Not having this integration working is a show stopper for my project.



/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 258
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionBase.php, fatal, 134
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php, preProcess, 53
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Core/Form.php, preProcess, 300
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 98
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 195
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 95
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 223
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Contribute/Invoke.php, run, 106
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Core/Component.php, main, 130
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/CRM/Core/Invoke.php, invoke, 158
/hsphere/local/home/iaidq/iaidq.eu/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 329
, civicrm_invoke,
/hsphere/local/home/iaidq/iaidq.eu/includes/menu.inc, call_user_func_array, 418
/hsphere/local/home/iaidq/iaidq.eu/index.php, menu_execute_active_handler, 15

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    We could not find contribution details for your request. Please try your request again.

    Return to home page.


reynog

  • Guest
Re: Drupal account not being created via profile contribution page
July 28, 2008, 08:56:51 am
I would like to help with this.  I had put it on the backburner, as I decided to just import my initial users and have them login before using the contribution page.  However, going forward, I really would like new users to be able to create their own accounts through the contribution page (and hopefully assign them to a Drupal role using the CiviMember Roles Sync module!).

Anyway, I am a PHP coder, so I will try to find some time in the next day or two to see what kind of debugging I can do.

DaraghOBrien

  • Guest
Re: Drupal account not being created via profile contribution page
July 28, 2008, 10:42:31 am
Reynog,

In case this is a module related issue, are you running any of the following?:

Organic Groups
Node Profile
Bio
Advanced User Profile

I'm going to unplug each of these in turn and see if they might be a contributor to the problem. I can live without node profile, Advanced user profile and Bio and still meet the requirements for the site that I'm putting together.


reynog

  • Guest
Re: Drupal account not being created via profile contribution page
July 28, 2008, 01:14:15 pm
Daragh,

I am not using any of the modules you listed, and am not using many (if any) user-related modules.  Particularly when I originally discovered this problem, I don't think I had enabled much of anything other than CiviCRM.

Will let you know if I come up with anything...

reynog

  • Guest
Re: Drupal account not being created via profile contribution page
July 28, 2008, 02:38:35 pm
Lobo-

I am attempting to debug CiviCRM, and am not having luck.  I haven't tried debugging before so maybe I'm missing something.

I added the following code at line 425 of CRM/Core/BAO/CMSUser.php:
CRM_Core_Error::debug('createDrupalUser', $values );

Then I ran through the scenario as described above...

I didn't get any debug statements on the screen, or in the CiviCRM.log file (if that is where the log entry is supposed to be going..)

Do I need to enable debugging somewhere, or is it possible it's not even getting to this method (in which case, do you have a recommendation of where further up the stack to start debugging?).

Also, I didn't use the exit() function.  Is that completely necessary?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal account not being created via profile contribution page
July 28, 2008, 02:58:44 pm

two things are possible below:

1. the code did not get there

2. the code got there, printed it out but was followed by a redirect so you dont see the message

putting an exit( ); eliminate option 2

If the code does not get there, you should add some debugging code to:

CRM/Contribute/Form/Contribution/Confirm.php, line 613 or so. This will help you figure out why the function is not getting called

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1] 2 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Drupal account not being created via profile contribution page

This forum was archived on 2017-11-26.