strange behavior with expiration / deactivation

Hello
We have a strange behavior when it comes to expiration / deactivation om memberships.
We have a site where we add our members manually to one ore several memberships on the members tab. The members have no access to do anything with their memberships. Memberships has no cost.

There is an inconsistency how the expiration/deactivation works. I have tried to find out why it is like this, but with no luck. Users/members are added in the same way. Sometime the membership does as it should and deactivates, sometimes it expires and sometime nothing happens.

Please help!

imageMembership shows how I have set ut the three memberships that I talk about.

image1: Person has "Bedömning BKR" and it expired yesterday, but it still is visible in list.

image2: Person has "Bedöming- BKR - Uppdatering" that expired 2015-07-15 and is still visible in list, Receptsamling got deactivated as it should on 2015-07-19

image3: Person has "NystartJämn" in list and it says it is still active, expires on 2015-07-30 and should be switched to "AfterNystart". Person also have "Bedömning Matplan" that is deactivated as it should.

image4: Person has "Efter Nystart" is it should be. this person was in the same group as the person in image3.

image5: shows a person that the deactivation of "Bedöming - BKR -Uppdatering" has worked as it should. "After Nystart" is added manually.

Best regards
/Cristina

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    I use W3 Total Cache, I installed it 2 weeks ago.

    I just updated to the newest version.
    Everything went fine.

    How do you want me to check if the behavior still occurs?
    I checked some of the members that are in the images and they are still in the same strange mode.

    Best Regards
    /Cristina

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    I have added the lines to W3TC on Thursday. Just after I created the memberships for the test users.

    For the test I did I gave 8 of my test users access to a test group that lasted for 2 days. The membership for all 8 users expired yesterday.

    Today when I look at the list of members that belong to the Test1 group they are all still in the list (image part 1)
    When I click on the card of one of the users I see that the Status of the membership is set to active even though it expired yesterday (2015-08-07) (image part 2)
    Then when clicking on the round arrows I can read the subscription details and there I see that the Status is expired (image part 3)

    Is this the correct behavior?

    Best Regards
    /Cristina

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    I checked the status of the memberships this morning again, now the inconsistency shows.

    I still have all the members in the list of members that I gave this membership to (part1)

    Looking into the profiles of the members I see that the member "Recept Samling" has the membership expired (part 2) and the rest of the members (part 3,4) still have them active.

    The only difference between the users is that I logged in with the member "Recept Samling" yesterday.

    After I noticed this difference I logged in with "Fia Pia" and no change to the Status.

    Best Regards
    /Cristina

  • Kasia Swiderska
    • Support nomad

    Hello Cristina,

    This should not happen indeed :slight_frown:
    Can you update Membership 2 Pro to the 1.0.1.0 version and if this is possible grant support access to your site? You can grant support access via WPMU DEV > Support > Support Access > Grant Access.
    I would like to check the settings and I will try to replicate this on my testing site to see if this is a bug or conflict with other plugin.

    Kind regards,
    Kasia

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    One more thing is that my admin is very slow (times out all the time if we are two persons working at the same time.)
    I have now tested through all my plugins and unfortunately found out that it is the Membership 2 plugin that slows my Admin.

    I don't know if I have some corrupt data somewhere since the migration or if the plugin is this slow.

    Please let me know what you find out.

  • Kasia Swiderska
    • Support nomad

    Hello Cristina,

    The last version should fix the issues with the expiring subscriptions - I'm looking at you site and there is none "test 1" subscription active. Did you removed it manually? I've set one more test that should expire today, so I will see the results in few hours.
    Can you enable debug mode in WordPress - it can show us if there are any errors in the Membership? There should be no problem with the Membership and the site performance.

    To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    'define('WP_DEBUG', true);'

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    'define( 'WP_DEBUG_LOG', true );'

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    'define( 'WP_DEBUG_DISPLAY', true );'

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

    Kind regards,
    Kasia

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    the wp-config already contains the following lines
    define('WP_DEBUG', true);

    /**
    * When debug mode is enabled, you can enable logging to store errors in wp-content/debug.log
    * This is useful for finding errors that might not get displayed on screen
    *
    * The next conditional section will make sure errors are not shown to users when logging is enabled
    * This helps with quick troubleshooting on live sites
    */
    define('WP_DEBUG_LOG', true);

    if(defined('WP_DEBUG_LOG') && WP_DEBUG_LOG == true) {
    @ini_set('display_errors',0); //Prevent PHP from displaying errors
    define('WP_DEBUG_DISPLAY', false); //Prevent Wordpress errors from being displayed

    I can see that you have added a test user and given him the Test1 membership.

    I don't understand what you mean with no active users in Test1 group, how do you see that?
    Looking at the Membership2->Memberships page, it says 9 users, 8 are mine and 1 is yours
    Looking at the Membership2->All members page, then clicking on Test1 group I get all the members listed. when I click on the little card on the right hand it says that the member is active with the date expired, except for the user "ReceptSamling" where it says expired.

    BR
    /Cristina

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    I can't find any logs. Is there a way where I can specify the output of the logfiles.

    Sending along an image how it looks today.

    part1
    You see that I have 9 members in the Test1 group

    part 2
    you see the 9 members in the list. Your member is there as well.

    part3
    clicked on the little card of your user and it says that membership is active even though it is the 2015-08-13

    part4
    clicked on the ring in Status for your user. there is says that Status is expired

    Same behavior as all of my test users the day after expiration.

    BR
    /Cristina

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    Today I checked your user and how it looks,

    When clicking on All Members then the Test1 group is still assigned to the user.
    Clicking on the card to the right the Status is expired

    Is this the expected behavior?

    When will the memberships get deactivated, is that a action that I have to do manually?

    BR
    /Cristina

  • Kasia Swiderska
    • Support nomad

    Hi Cristina,

    I'm sorry for the late response, I'm currently on holidays.
    It looks like that - when the subscription expires, then membership is still attached to the member, but member should be blocked front the content. This allows him to renew his membership.
    Member can also Cancel it's membership in any time, you can also do that by changing status to Cancelled or Deactivated. This way - he will have to join again to get his access back. This action will remove this subscription from the user.
    Sometimes expiration could take while to be done, and this is because the plugins check the statuses of subscriptions once in few hours. When you go to the Membership 2, at the bottom you will see small text, like this "Check Membership Status changes in 0 hrs 06 min. No pending Email Responses found".
    This shows how much time left for checking the statuses. You can extort this by clicking the link in this text (under the time). This statuses are handled by wp_cron() - this mechanism is not perfect, because it needs to have trafic on site to run - so in case there is no traffic on site in that time, it could not check the statuses. This could case the delays with the expirations.

    In previous version there was problem with the expiration statuses and the last one (actual) should fix this.

    Kind regards,
    Kasia

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    Thank you for your reply
    I can see that things are not perfect.

    I did a new test with a membership that, when expired, should lead to another membership. This test I did after the upgrade to the latest version. This does not work either. The user still has the status Active for the first membership and can access the pages, NOT good, and does not have access to the next membership level.

    If I understand you right, the expiration should work (most of the time) if wp_cron() works. How do I check if I have the right configs for wp_cron() to work together with Membership2? What should be in the database?

    If I want the memberships deactivated I will have to do that manually (or code a loop that does that for me).

    Maybe you could extend the page (?page=membership2&step=overview&membership_id=8563) with containing the information about the end date and the current status?

    BR
    /Cristina

  • Vinod Dalvi
    • WP Unicorn

    Hi Cristina,

    I did a new test with a membership that, when expired, should lead to another membership. This test I did after the upgrade to the latest version. This does not work either. The user still has the status Active for the first membership and can access the pages, NOT good, and does not have access to the next membership level.

    Could you please tell me for what membership have you done the test on your site so that i can check the setting of it and could also test it myself?

    Also it seems the support staff access is revoked on your site so could you please regrant it so that we can troubleshoot it?

    If I understand you right, the expiration should work (most of the time) if wp_cron() works. How do I check if I have the right configs for wp_cron() to work together with Membership2? What should be in the database?

    In the membership plugin the CORN jobs ms_cron_check_membership_status and ms_cron_process_communications are scheduled after every 6 hours and hourly respectively using the WordPress function wp_schedule_event

    You can run these CRON jobs immediately from the Membership 2 Pro settings page as shown in the attached screenshot.

    You can view the running CRON jobs using any of the following plugins.

    https://wordpress.org/plugins/wp-crontrol/
    https://wordpress.org/plugins/advanced-cron-manager/

    Maybe you could extend the page (?page=membership2&step=overview&membership_id=8563) with containing the information about the end date and the current status?

    Currently the member membership statuses are displayed on that page as shown in the second attached screenshot.

    Regarding displaying end date there, I will move this over to the features & feedback section. This way it can be considered for future development, and we can also see what other community members think about the feature request.

    Regards,
    Vinod Dalvi

  • Cristina Krügnell
    • Site Builder, Child of Zeus

    Hello

    Sorry for a late response.
    I have been on vacation and got the white page of death.
    We have found out that Membership 2 plugin is not working very well together with Woocomerce, I moved Woo to a separate sub-domain and everything is much faster.

    Now when everything is setup again and I have updated to the latest release of Membership 2 I really enjoy the new feature to be able to se the active/expired subscriptions. That is good enough for me as then I can deactivate the subscriptions if needed.

    For the other issue where I had problems with when ending one subscription moving to another I just set up a new test. I have granted you access if you would need it. One of the users that are part of the test is your user.

    I will let you know the results of the test when the first subscription is over

    BR
    /Cristina

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.