Body: <p>This issue has been going on for quite some time and I was hoping I just needed to upgrade the CiviCRM but I am on 4.7.27 now and am wondering if I have possibly set something up incorrectly.</p>
  
  <p>Our users are able to pay for a membership via a CiviContribute page. The membership is for an online training subscription and I use Drupal's CiviMember Role Sync module to then give users with active memberships of this kind a special role to access other parts of the website.</p>
  
  <p>When users submit payment and subscribe, an end date to their membership is recorded but not a start date or a member since date. </p>
  
  <p>Things to note: </p>
  
  <ul>
  <li>users must renew manually and are not on any kind of auto-renew</li>
  <li>the membership is good for one year</li>
  <li>some users use a discount code, but the bug seems to affect anyone that signs themselves up</li>
  <li>if we sign someone up through the back end, it records everything correctly</li>
  </ul>
  
  <p><a href="https://i.sstatic.net/s3H2i.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/s3H2i.png" alt="enter image description here"></a></p>
  
  <p>Edit: Here is a sample of the membership date fields of an entry in the <code>civicrm_membership</code> table;</p>
  
  <pre><code>                   id: 4942
             contact_id: 131490
     membership_type_id: 1
              join_date: NULL
             start_date: NULL
               end_date: 2018-10-23
  </code></pre>
  
  <p>Edit2: The <code>civicrm_membership_log</code> entries for this id shows:</p>
  
  <pre><code>select * from civicrm_membership_log where membership_id=4942 \G
  *************************** 1. row ***************************
                  id: 12498
       membership_id: 4942
           status_id: 5
          start_date: NULL
            end_date: NULL
         modified_id: 131490
       modified_date: 2017-10-23
  membership_type_id: 1
         max_related: NULL
  *************************** 2. row ***************************
                  id: 12499
       membership_id: 4942
           status_id: 1
          start_date: NULL
            end_date: 2018-10-23
         modified_id: 131490
       modified_date: 2017-10-23
  membership_type_id: 1
         max_related: NULL
  *************************** 3. row ***************************
                  id: 12518
       membership_id: 4942
           status_id: 2
          start_date: NULL
            end_date: 2018-10-23
         modified_id: 2
       modified_date: 2017-10-23
  membership_type_id: 1
         max_related: NULL
  3 rows in set (0.00 sec)
  </code></pre>
  
  <p>Important to note that memberships status are updating correctly and access is appropriate and doesn't seem to be affected by this bug. In fact, it's not causing any noticeable issues because the mechanism that updates memberships is based on the end date, which is being recorded.</p>
  
  <p>Edit 3: The effects seem to have started a couple weeks after I upgraded from a 4.3 system to 4.7.15, however, I don't think the upgrade did it because it was a couple weeks after. It seems to coincide with <a href="https://civicrm.stackexchange.com/questions/16628/outgoing-mail-settings-civismtp-php-5-6-x-problem">this issue</a>, when I had to modify some code in <code>packages/Net/SMTP.php</code> to accommodate a startTLS issue, however, not sure if this is related. Also I noticed that the <code>packages/Net/SMTP.php</code> doesn't exist anymore after my upgrade so it's probably not that.</p>
  
  <p>Edit 4: I'm on 5.14.0 now with Drupal 7.69 and still having this issue but even more frequently.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-10T20:15:49.543Z
Comments.Text: That sounds real odd - are you getting the values in the db?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T04:54:53.570Z
Comments.Text: DB records "null". I edited my post with details.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T18:03:39.977Z
Comments.Text: Do you have any customisations? Extensions which might impact on Memberships eg CiviRules?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T18:32:04.107Z
Comments.Text: The only extensions from when this started is CiviDiscount. I don't believe there are any customizations, at least for sure not in the codebase.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T18:36:22.863Z
Comments.Text: Anything odd about your Member Status - thought I can't see how this could affect just Join/Start Date. Ah, can you look in the log_civicrm_membership table for that record 4942 and tell us if the Join/Start gets created then removed, or just never exists
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T18:58:21.080Z
Comments.Text: Updated my answer to include the `civicrm_membership_log` entry and the changelog only has one entry as well.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T21:20:30.920Z
Comments.Text: was there really only one log record for that membership? anything in the civicrm_membership_log table that might shed some light
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T21:21:12.640Z
Comments.Text: what do your Activities show in terms of the Membership - when was it created?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T21:39:52.243Z
Comments.Text: Changelog has one entry for the date and time that her membership was created and her contribution went through. No other entries in the log which matches when the activities log shows membership creation.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T22:38:15.143Z
Comments.Text: what is 'status_type_id' 5 and does it relate to my wondering if Memb Status might have some gaps or overlaps that is throwing things askew
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-11T23:15:47.260Z
Comments.Text: I realized the log wasn't the right entry. There are three. It goes from "pending" (5) to "new" (1) to "current" (2).
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-12T03:44:28.077Z
Comments.Text: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/70090/discussion-between-petednz-fuzion-and-christia).
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-02T02:05:02.763Z
Comments.Text: Christia - do you recall the outcome of this?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-09T23:23:19.617Z
Comments.Text: This is an issue I am still trying to pin down. All I can think of at this point is to make sure that any records with "pending" transactions are cleaned up. But so far this is still happening and seems to be tied to the Lifetime membership issue I posted here, which we are also still having.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-27T06:49:20.813Z
Comments.Text: @Christia Pls check if this is not the same problem as mentioned in https://civicrm.stackexchange.com/a/39407/245.
Comments.UserDisplayName: jitendra - fuzion
Tags: <drupal><civicontribute><civimember>
Title: Member Since and Start Date aren't being recorded in membership details
ThreadText: # Member Since and Start Date aren't being recorded in membership details
  
  (Asked by: username_0 on 2017-12-08)
  
  This issue has been going on for quite some time and I was hoping I just needed to upgrade the CiviCRM but I am on 4.7.27 now and am wondering if I have possibly set something up incorrectly.
  
  Our users are able to pay for a membership via a CiviContribute page. The membership is for an online training subscription and I use Drupal's CiviMember Role Sync module to then give users with active memberships of this kind a special role to access other parts of the website.
  
  When users submit payment and subscribe, an end date to their membership is recorded but not a start date or a member since date.
  
  Things to note:
  
  * users must renew manually and are not on any kind of auto-renew
  * the membership is good for one year
  * some users use a discount code, but the bug seems to affect anyone that signs themselves up
  * if we sign someone up through the back end, it records everything correctly
  
  [![enter image description here](https://i.sstatic.net/s3H2i.png)](https://i.sstatic.net/s3H2i.png)
  
  Edit: Here is a sample of the membership date fields of an entry in the `civicrm_membership` table;
  
  ```
                     id: 4942
             contact_id: 131490
     membership_type_id: 1
              join_date: NULL
             start_date: NULL
               end_date: 2018-10-23
  
  ```
  
  Edit2: The `civicrm_membership_log` entries for this id shows:
  
  ```
  select * from civicrm_membership_log where membership_id=4942 \G
  *************************** 1. row ***************************
                  id: 12498
       membership_id: 4942
           status_id: 5
          start_date: NULL
            end_date: NULL
         modified_id: 131490
       modified_date: 2017-10-23
  membership_type_id: 1
         max_related: NULL
  *************************** 2. row ***************************
                  id: 12499
       membership_id: 4942
           status_id: 1
          start_date: NULL
            end_date: 2018-10-23
         modified_id: 131490
       modified_date: 2017-10-23
  membership_type_id: 1
         max_related: NULL
  *************************** 3. row ***************************
                  id: 12518
       membership_id: 4942
           status_id: 2
          start_date: NULL
            end_date: 2018-10-23
         modified_id: 2
       modified_date: 2017-10-23
  membership_type_id: 1
         max_related: NULL
  3 rows in set (0.00 sec)
  
  ```
  
  Important to note that memberships status are updating correctly and access is appropriate and doesn't seem to be affected by this bug. In fact, it's not causing any noticeable issues because the mechanism that updates memberships is based on the end date, which is being recorded.
  
  Edit 3: The effects seem to have started a couple weeks after I upgraded from a 4.3 system to 4.7.15, however, I don't think the upgrade did it because it was a couple weeks after. It seems to coincide with [this issue](https://civicrm.stackexchange.com/questions/16628/outgoing-mail-settings-civismtp-php-5-6-x-problem), when I had to modify some code in `packages/Net/SMTP.php` to accommodate a startTLS issue, however, not sure if this is related. Also I noticed that the `packages/Net/SMTP.php` doesn't exist anymore after my upgrade so it's probably not that.
  
  Edit 4: I'm on 5.14.0 now with Drupal 7.69 and still having this issue but even more frequently.
  
  **Tags:** drupal, civicontribute, civimember
  
  > **Comments:**
  > **username_1**: That sounds real odd - are you getting the values in the db?  
  > **username_0**: DB records "null". I edited my post with details.  
  > **username_1**: Do you have any customisations? Extensions which might impact on Memberships eg CiviRules?  
  > **username_0**: The only extensions from when this started is CiviDiscount. I don't believe there are any customizations, at least for sure not in the codebase.  
  > **username_1**: Anything odd about your Member Status - thought I can't see how this could affect just Join/Start Date. Ah, can you look in the log_civicrm_membership table for that record 4942 and tell us if the Join/Start gets created then removed, or just never exists  
  > **username_0**: Updated my answer to include the `civicrm_membership_log` entry and the changelog only has one entry as well.  
  > **username_1**: was there really only one log record for that membership? anything in the civicrm_membership_log table that might shed some light  
  > **username_1**: what do your Activities show in terms of the Membership - when was it created?  
  > **username_0**: Changelog has one entry for the date and time that her membership was created and her contribution went through. No other entries in the log which matches when the activities log shows membership creation.  
  > **username_1**: what is 'status_type_id' 5 and does it relate to my wondering if Memb Status might have some gaps or overlaps that is throwing things askew  
  > **username_0**: I realized the log wasn't the right entry. There are three. It goes from "pending" (5) to "new" (1) to "current" (2).  
  > **username_1**: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/70090/discussion-between-username_1-and-username_0).  
  > **username_1**: username_0 - do you recall the outcome of this?  
  > **username_0**: This is an issue I am still trying to pin down. All I can think of at this point is to make sure that any records with "pending" transactions are cleaned up. But so far this is still happening and seems to be tied to the Lifetime membership issue I posted here, which we are also still having.  
  > **username_2**: @username_0 Pls check if this is not the same problem as mentioned in https://civicrm.stackexchange.com/a/39407/245.  
  
  ---
  
  ## 0 answers
  
  