Answers.Body: <p>There was a rule that redirected members to a page after login. Disabling that rule seems to have resolved the issue.</p>
  
  <p>This was working earlier, a Drupal upgrade must have caused the problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-02T19:10:21.503Z
Answers.LastActivityDate: 2016-03-02T19:10:21.503Z
Answers.UserDisplayName: Sanjay Jain
Answers.Body: <p>Oh no! It looks like you've found a bug!</p>
  
  <p>Here's how to take care of this pesky critter:</p>
  
  <p>1) Check in the Drupal watchdog and civicrm log files for messages that occurred around about the same time as the contribution.</p>
  
  <p>2) Establish if the contact was created in CiviCRM (your post doesn't explicitly say it was). If so, is it tied to the contribution and Drupal user?</p>
  
  <p>3) If the answer to the above is yes, establish if you can create memberships on that user with the CiviCRM api.</p>
  
  <p>4) If the answer to 3) is yes, then it should be possible to establish where in the code the critter is, put breakpoints around it (or use debug output or die commands) to establish where the error is. Finding out what parameters are going in is usually the thing to do here - so many times SQL queries end up trying to insert an illegal empty string or similar.</p>
  
  <p>When you have that information, you have enough to file a bug report with the core team!</p>
  
  <p>Hope that helps,</p>
  
  <p>John</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-02T17:41:39.947Z
Answers.LastActivityDate: 2016-03-02T17:41:39.947Z
Answers.UserDisplayName: JohnFF
Body: <p>We are seeing this on Drupal 7.4.2 / CiviCRM 4.6.13 instance</p>
  
  <p>A new (anonymous) user makes a contribution (using price sets) to sign up for a membership. The profile forces an account creation.</p>
  
  <p>The contribution is recorded but no membership is created. The Drupal contact is created too. Has any one seen this? </p>
  
  <p><strong>Update:</strong> this was due to a rule/trigger that redirected members on login. Disabling the trigger has resolved the problem.</p>
  
Tags: <drupal><civimember>
Title: Contribution recorded but no membership created when account creation is used
ThreadText: # Contribution recorded but no membership created when account creation is used
  
  (Asked by: username_0 on 2016-03-02)
  
  We are seeing this on Drupal 7.4.2 / CiviCRM 4.6.13 instance
  
  A new (anonymous) user makes a contribution (using price sets) to sign up for a membership. The profile forces an account creation.
  
  The contribution is recorded but no membership is created. The Drupal contact is created too. Has any one seen this?
  
  **Update:** this was due to a rule/trigger that redirected members on login. Disabling the trigger has resolved the problem.
  
  **Tags:** drupal, civimember
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2016-03-02. Score: 0 | Accepted answer
  
  There was a rule that redirected members to a page after login. Disabling that rule seems to have resolved the issue.
  
  This was working earlier, a Drupal upgrade must have caused the problem.
  
  
  ---
  
  ### Answer by username_1 on 2016-03-02. Score: 0
  
  Oh no! It looks like you've found a bug!
  
  Here's how to take care of this pesky critter:
  
  1) Check in the Drupal watchdog and civicrm log files for messages that occurred around about the same time as the contribution.
  
  2) Establish if the contact was created in CiviCRM (your post doesn't explicitly say it was). If so, is it tied to the contribution and Drupal user?
  
  3) If the answer to the above is yes, establish if you can create memberships on that user with the CiviCRM api.
  
  4) If the answer to 3) is yes, then it should be possible to establish where in the code the critter is, put breakpoints around it (or use debug output or die commands) to establish where the error is. Finding out what parameters are going in is usually the thing to do here - so many times SQL queries end up trying to insert an illegal empty string or similar.
  
  When you have that information, you have enough to file a bug report with the core team!
  
  Hope that helps,
  
  John
  
  
  ---
  
  