Answers.Body: <p>Using the CiviCRM menu, if you navigate to Administer > CiviMember > Membership Status Rules (<code>civicrm/admin/member/membershipStatus</code>) you should see a list of membership status rules. These dictate the "workflow" of a membership, and they need to chain together correctly. For example, on the sample site I have handy the rules are:</p>
  
  <ul>
  <li><em>New</em> - ends +3 months from "member since" start date (configuration pictured below).</li>
  <li><em>Current</em> (rest of membership - doesn't have start/end config in my sample site, but is the "default" state)</li>
  <li><em>Grace</em> - starts end of membership, ends +1 month from that date</li>
  <li><em>Expired</em> - starts +1 month from end of membership</li>
  <li><em>Pending</em>, <em>Cancelled</em>, <em>Deceased</em> - not part of the automatic process.</li>
  </ul>
  
  <p>Here's what "New" looks like.</p>
  
  <p><a href="https://i.sstatic.net/jLI1u.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jLI1u.png" alt="configuration for &quot;New&quot; membership status"></a></p>
  
  <p>I suggest you inspect the dates those members are trying to renew and work out where in this workflow they would fall given the rules on your site (expired or grace presumably, since you seem to have a fixed year membership and it's now May in the next year). It may be that a membership state has been removed from the workflow and this leaves a gap, or that the timeline has been adjusted for one but not another.</p>
  
  <p>Just a guess, that's where I'd look first!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-06T02:10:19.430Z
Answers.Text: It's also a bit eye-catching that the error message contains dates in two different formats - probably storage format `20171231` and input format `2018-05-04 22:00:50`. If the membership status rules don't solve it, I'd debug the date comparison next.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-06T02:12:59.180Z
Answers.Text: https://github.com/civicrm/civicrm-core/blob/3d04355de56e2293afda299bc4e00d5816010082/CRM/Member/BAO/Membership.php#L288 is where the calculation seems to fail
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-06T02:08:23.420Z
Answers.LastActivityDate: 2018-05-06T02:14:11.007Z
Answers.LastEditDate: 2018-05-06T02:14:11.007Z
Answers.UserDisplayName: Chris Burgess
Body: <p>I am on Joomla 3.8.7 and civiCRM 4.7.31. Recently, Two members received the following error message when trying to renew their memberships:</p>
  
  <blockquote>
    <p>"The membership cannot be saved because the status cannot be calculated for start_date: 20170101 and end_date: 20171231 join_date: 20170306 as at 2018-05-04 22:00:50"</p>
  </blockquote>
  
  <p>Over 100 members have successfully renewed their memberships this year so I'm not sure why this is happening.</p>
  
  <p>Can someone help?<a href="https://i.sstatic.net/jvgv2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jvgv2.png" alt="enter image description here"></a></p>
  
Tags: <civicontribute><civimember>
Title: "Membership status cannot be calculated for <dates>" Renewal Error!
ThreadText: # "Membership status cannot be calculated for <dates>" Renewal Error!
  
  (Asked by: username_0 on 2018-05-05)
  
  I am on Joomla 3.8.7 and civiCRM 4.7.31. Recently, Two members received the following error message when trying to renew their memberships:
  
  > "The membership cannot be saved because the status cannot be calculated for start\_date: 20170101 and end\_date: 20171231 join\_date: 20170306 as at 2018-05-04 22:00:50"
  
  Over 100 members have successfully renewed their memberships this year so I'm not sure why this is happening.
  
  Can someone help?[![enter image description here](https://i.sstatic.net/jvgv2.png)](https://i.sstatic.net/jvgv2.png)
  
  **Tags:** civicontribute, civimember
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-05-06. Score: 2
  
  Using the CiviCRM menu, if you navigate to Administer > CiviMember > Membership Status Rules (`civicrm/admin/member/membershipStatus`) you should see a list of membership status rules. These dictate the "workflow" of a membership, and they need to chain together correctly. For example, on the sample site I have handy the rules are:
  
  * *New* - ends +3 months from "member since" start date (configuration pictured below).
  * *Current* (rest of membership - doesn't have start/end config in my sample site, but is the "default" state)
  * *Grace* - starts end of membership, ends +1 month from that date
  * *Expired* - starts +1 month from end of membership
  * *Pending*, *Cancelled*, *Deceased* - not part of the automatic process.
  
  Here's what "New" looks like.
  
  [![configuration for "New" membership status](https://i.sstatic.net/jLI1u.png)](https://i.sstatic.net/jLI1u.png)
  
  I suggest you inspect the dates those members are trying to renew and work out where in this workflow they would fall given the rules on your site (expired or grace presumably, since you seem to have a fixed year membership and it's now May in the next year). It may be that a membership state has been removed from the workflow and this leaves a gap, or that the timeline has been adjusted for one but not another.
  
  Just a guess, that's where I'd look first!
  
  > **Comments:**
  > **username_1**: It's also a bit eye-catching that the error message contains dates in two different formats - probably storage format `20171231` and input format `2018-05-04 22:00:50`. If the membership status rules don't solve it, I'd debug the date comparison next.  
  > **username_1**: https://github.com/civicrm/civicrm-core/blob/3d04355de56e2293afda299bc4e00d5816010082/CRM/Member/BAO/Membership.php#L288 is where the calculation seems to fail  
  
  ---
  
  