membership 2 pro – problems with multiple duplicate automated emails

Hi

I know I already have a couple of tickets still open for this site – so I hope you are Ok with me opening a new topic – since it is for different issues…

Here are our problems:

1. The members on this site are getting multiple automated duplicate emails for the same event.

We have enabled the email log add on and you can see the complaints are legitimate.

2. We have had at least one case where someone has purchased a one year membership and the system recorded the one payment but extended his membership two years –

The user name on this member is marcinszpak – I have also attached a screen shot.

It's not consistent as you will see the members from Dec. 3 – Ken Snyder and Dec 9 – Marcus T

these worked properly extending only one year. Is there anything that would cause this in the payment process?

Please advise ASAP – we have long battle trying to get this plug-in to work as designed.

  • Nithin
    • Support Wizard

    Hi Larry Davis,

    Hope you are doing good today. :slight_smile:

    1. The members on this site are getting multiple automated duplicate emails for the same event.

    I tested with a new user, and I was able to replicate this issue. However, for the purpose of testing, I disabled Send copy to Administrator for the email template Subscription – Completed with payment Message: , and now I could notice only one email being sent. Could you please check and confirm this, and see whether that helps for other email templates? If that works, I’ll give a closer look at this, please let us know. However, I’m not able to replicate the same in my system, the emails doesn’t get duplicated.

    2. We have had at least one case where someone has purchased a one year membership and the system recorded the one payment but extended his membership two years –

    This is odd, does this happen to all the users of that particular membership, or is the issue specific only to these few members that you have mentioned. Since it’s a live payment gateway, I couldn’t test this out, by re-subscribing. Is it possible that we could switch the payment gateway to sandbox temporarily, and check how the payment goes? If not, could you please setup a staging website, so that we could test this extensively, so that we could have a better idea about this issue.

    Please check this link, on how to setup a staging environment:

    https://premium.wpmudev.org/blog/testing-environment-wordpress/

    Please let us know how that goes, so that we could get this sorted. Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    The membership length doubling so far has only happened for the one user – we manually reset this and I will continue to monitor this.

    BUT THE duplicate emails has not been solved at all – PLEASE LOOK under the http://aviationphoto.org/wp-admin/admin.php?page=membership2-help&tab=emails

    You will see this plug-in just keeps sending multiple emails per event – and it’s not that we were also copying the admin. My test account (email – larryallegra@gmail.com) is receiving these and so are the other members . This is really reflecting poorly on the new website.

    We need some php fix that will only let the system send out one mail per event (sign-up, membership about to expire, and membership expired etc….)

    Now it sends some out 6 minutes apart some 4 hours apart – it’s like it’s possessed!

    Please let us know something ASAP.

    Thank you and Happy Holidays!

    Larry

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi

    Another bug was reported to me today – and I tested in with my test user LDTEST – which membership has expired – when I go to the renewal page – it takes me directly to Pay Pal and PayPal appears to accept the payment but it does not – and of course it does not renew the membership.

    What am I missing? it should first open up the account page first should it not? so the sytem knows which membership you are renewing?

    Please advise – I hope you have are making progress on the multiple email issues..as well.

    Thank you! AND Merry Christmas if you celebrate!

    Thank you!

    Larry Davis

  • Kasia Swiderska
    • Support nomad

    Hello Larry,

    Now it sends some out 6 minutes apart some 4 hours apart – it's like it's possessed!

    Please let us know something ASAP.

    I searched in our system and found that this is bug with those emails. Very problematic bug, because we can't replicate it on our tests sites. I've send message to developer what is fix status of that bug and added your thread to bug report.

    In the meantime, since we're not going to want to entirely disable the reminder emails, we can cut down on the amount of duplicate emails being sent by inserting this into the wp-config.php:

    define( "MS_DUPLICATE_EMAIL_HOURS", 24 );

    before line /* That's all, stop editing! Happy blogging. */

    That'll limit duplicate emails to being sent once every 24 hours.

    Another bug was reported to me today – and I tested in with my test user LDTEST – which membership has expired – when I go to the renewal page – it takes me directly to Pay Pal and PayPal appears to accept the payment but it does not – and of course it does not renew the membership.

    What am I missing? it should first open up the account page first should it not? so the sytem knows which membership you are renewing?

    I tested now that member (see support message I left there new password for that test account) and I could select which membership I want to renew:

    but then when I tried to paid for it paypal showed me error its already paid.

    Did you installed recently any new plugin? Like cache plugin? Could you disable it?

    There is something wrong when renewing those accounts – do you have by any chance debug log enabled? If not please 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', false );

    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. I would need then to see content of the debug.log file.

    Then please make another test on test membership with test user so it will generate error in debug.log file – after that upload it to service like a dropbx and paste link here.

    kind regards,

    Kasia

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Kasia-

    I have made the WP Debug – mods from False to True and retried to renew LDTEST member and same problem it acts like payment was already made –

    we had the W3 TC cache plug-in running before the trouble (no other plug-in was added or enabled) but for testing purposes I deactivated – it made no difference at all-

    As far as the code to limit an email every 24 hours – When I copied and pasted what you provided it caused a syntax error and the site would not load –

    I placed it right were you suggested – again here is the code define( "MS_DUPLICATE_EMAIL_HOURS", 24 ); so I’m not sure what is going on.

    Regarding the debug.log file – the last one in the destination is 11/28/16 ( /wp-content/debug.log ) so I’m not sure why the error log with the settings now to True are not generating an error log. Which is why I have attached a copy of the wpconf. file for you in Word file so you can see for your self.

    What should be our next step?

    Thank you!

  • Nithin
    • Support Wizard

    Hi Larry Davis,

    Hope you are doing good today. :slight_smile:

    I tried to create a new user(wpmutwo), through the dashboard, and added an ISAP membership to the new user, but I only got one confirmation of the membership email, ie Subscription – Completed with payment Message: , could you please check whether creating users through the dashboard, you are getting the same results for this specific template?

    I’m afraid, wp-config.php file isn’t attached below, members can only attach txt files, or you’ll have to share the link to your file using cloud services like Google Drive, Dropbox etc. Please do note, this is a public forum, so make sure to mask the important information like DB name, user, password from the wp-config.php file.

    When I copied and pasted what you provided it caused a syntax error and the site would not load –

    I placed it right were you suggested – again here is the code define( “MS_DUPLICATE_EMAIL_HOURS”, 24 ); so I’m not sure what is going on.

    Regarding the debug.log file –

    This is odd, the provided code should be correct, could you please make sure to place the code, just before the line /* That’s all, stop editing! Happy blogging. */

    define( "MS_DUPLICATE_EMAIL_HOURS", 24 );

    If you still get syntax error, please paste the full error what you are getting in the next reply.

    so I’m not sure what is going on.

    Regarding the debug.log file – the last one in the destination is 11/28/16 ( /wp-content/debug.log ) so I’m not sure why the error log with the settings now to True are not generating an error log.

    I checked your website, and I could see notices being displayed in your dashboard, it seems like you have only enabled debug to be displayed in the website, and haven’t defined the option to save the errors to the log file? Could you please make sure this is the code your have added in the wp-config.php file:

    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    Please let us know how that goes, and replicate the same issue, so that a debug.log file is generated with latest logs. Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin:

    Yes – When I create one test user LDTEST3 – as far as this morning – only one email was sent out.

    I double checked the wp.config settings and this time I was able to place the duplication code in OK – and I will test it this afternoon to see if a log file is now being created.

    I will check back after my meetings!

    Thank you!

    Larry

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    Ok – the debug log is working now – and I tried again to renew the member LDTEST and the Pay Pal returns me back to the website – Pay Pal does not complete the payment and the site of course does not renew the membership.

    Here’s drop box link to the debug log

    https://www.dropbox.com/s/6gsuhsk59pznpvx/debug-3.log?dl=0

    As far as the multiple email notifications – it appears that the signing up a new member is only generating one email but the alert for subscription events which were being duplicated – i will monitor today – I see the system generated only one email so for today – so perhaps the one per 24 hour code is working.

    Can you please update me after you have had a chance to review the debug log.

    Thank you!

    Larry

  • Nithin
    • Support Wizard

    Hi Larry Davis,

    Hope you are doing good today. :slight_smile:

    Ok – the debug log is working now – and I tried again to renew the member LDTEST and the Pay Pal returns me back to the website – Pay Pal does not complete the payment and the site of course does not renew the membership.

    Here’s drop box link to the debug log

    https://www.dropbox.com/s/6gsuhsk59pznpvx/debug-3.log?dl=0

    Unfortunately debug.log error doesn’t provide any clue regarding why PayPal doesn’t complete the payment. I checked your website, and it seems like you are using Live Payment gateway, so I wasn’t able to test this out. Are you having issue with only renew? or the single payment doesn’t work at all? Do you have a thread related to this issue? It would be better if you could keep the issues separate in threads, so that it would be easier to sort, and follow the issues easily :slight_smile:

    Is it possible that we could temporarily switch to a sandbox account, and see how the payments goes?

    As far as the multiple email notifications – it appears that the signing up a new member is only generating one email but the alert for subscription events which were being duplicated – i will monitor today – I see the system generated only one email so for today – so perhaps the one per 24 hour code is working.

    Glad to know it’s not duplicating the emails like before. Please do let us know how your test goes, so that we could give a closer look. If you still get duplicate emails, please do test with Send copy to Administrator option disabled for those templates as mentioned in my previous reply, and see whether the issue is still being generated. Disabling that option is not a normal use case, but would like to make sure whether that option is causing any conflict or not.

    Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    Regarding the Pay Pal issue – I have had so many issues with this plug-in – I don’t believe this is a duplicate thread – Yes we are only have the problems with renewals – still!

    We originally had the account set-up as the other Pay Pal option on the standard gateway and could not get the payments to connect at all – then one of the other WPMU tech support people had dealt with this –

    From James Morris – WPMU support

    “Hello Larry Davis,

    I’ve been testing this extensively today. Both on your site and my own. What I’ve found is if you use the PayPal Standard gateway, the multiple notifications are always sent. I also confirmed that M2P is not properly sending out the emails.

    However, on both my test site and on your site, I did see that the money was collected and memberships were created properly. It’s just the email notifications and the PayPal notifications that are not working properly.

    I’m going to report this as a bug to our developers since I’ve been able to confirm on our test servers as well.

    In the meantime, is using the PayPal Single Gateway an option you would consider for now? Since you are only doing Finite Access memberships instead of recurring memberships, this should still work well in your situation.

    I cannot give an ETA on when the bug fix for this will be released, but I assure you that our devs will address this as soon as technically possible.”

    so we are still on Live Gateway – if you know how to set-up a sandbox for this for testing – please do – I don’t

    A new BIG problem – is that somehow this site after disabling a W3TC or some other event yet to be determined took and placed several images in a protected folder.

    Well I looked high and low through all the files on the site aviation photo.org – and the folder http://aviationphoto.org/downloads does not exist – yet it serves up when you are logged in as an admin. the file http://aviationphoto.org/downloads/ms_15477.jpg – but to add even more strangeness into this is the url for this photo media library is http://aviationphoto.org/wp-content/uploads/2016/11/Jessica-Ambata-bio.jpg. But when I try to link it back to this photo – either by using the CMS tool or via an external link and save the page the site still serves up

    file from the invisible http://aviationphoto.org/downloads folder.

    Since it appears to be protected by the membership plug-in – I checked all the membership plug-in folder for this downloads folder it does not exist. How can server publish images but have no content folder to upload them from?

    I’m in big trouble on this project and thinks continue to get worse…. Please can’t a team at WPMU help us through these problems?

    Thank you

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    A follow-up to the strange downloads folder issue – we have confirmed that the M2 Plug-in is causing

    the problem – when we deactivate the plug-in all the images return to normal.

    WHAT IS GOING ON WITH THIS PLUG IN?

    Thank you!

    Larry

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin –

    Also the site runs 10 times faster without the plug-in activated – with no third party cache –

    so something is definitely wrong with the plug-in either with a conflict with this version of WP or another plug-in. If you view the site without the plug-in enable it’s a rocketship.

    Can you please let me know something ASAP!

    Larry

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    Hi James-

    Well me and my code engineer worked all day on this and we found the problem with images being protected and saved to a virtual folder.

    The media protection “add on” for M2 was the culprit – when we deactivated this all the media files sources were corrected.

    I still don’t know where we are at on the Pay Pal renewal issue – but I will test this again tomorrow.

    I think we still have a problem here.

    I wanted to keep you updated!

    Larry

  • Kasia Swiderska
    • Support nomad

    Hello Larry ,

    I’m sorry for the delay on our site. When you post few times in row our system treats every post as new answer and puts lower in queue – and we process queue from top to bottom so in busy time it can cause delays.

    I’m checking your site now and in billing transactions I can see many successful payments – do I understand that switching to Single PayPal did help with those?

    Did you do any additional tests on Standard Gateway?

    I checked again your system but add-ons that could prevent renewing are not enabled and those errors in debug log are not showing anything.

    I’ve pinged our dev to get more info if we can debug only PayPal.

    kind regards,

    Kasia

  • Larry Davis
    • Site Builder, Child of Zeus

    Thank you Kasia –

    For getting back to me – I have been working through the on-going issues with this site – and the client had been busy moving their offices. So for the last month we have been limping by.

    Member’s are able to sign-up and renew and the plug-in is working but not without a couple of problems we still need to address:

    1. Pay Pal Issues – We are using the PP std. gateway – because the PP live-single gateway was causing a problem not letting member’s renew – BUT now Pay Pal sends out an email that a recurring

    profile has been created and then another email saying that this profile is canceled. It still records single payment for the std. membership (that is set-up for one payment infinite date range of 1 year).

    This causes confusion for the members and it is irritating the management of the Assoc.. (see attachment PP-STD REC.jpg)

    Further more – when the single gateway was used before we received an actual receipt which included the address of the new member – this is important to the client. (see attachment PP-STD REC.jpg).

    I have checked the client’s PP account settings and I have talked with technical support at PP – they tell me the only way this can happen is that the API (M2 pro plug-in) is submitting payment requests that indicate the even is recurring – but as you can see from the membership settings none of the membership types are recurring – in fact only the std. membership and our test membership for $1 require payment. I don’t know if I should go back to the single gateway because when we did this the exiting members could not renew.

    2. Multiple automated emails from the system – the additional script to the wp-conf. file to limited only one email per 24 hours was working up to a couple of days ago but I see from a test membership I ran a couple of days ago (which is set for a 10 day period) I started receiving emails again today 3 in a row one hour a part. I know one of the issues before is that we wanted to make sure “copy to administrator ” on this automated emails in unchecked – I verified that this AM.

    Another really strange thing is that these multiple emails are not showing up on the log add-on under the help area.

    3. WP Security Plug-in – the client in the past had had their old website hacked and though we have an SSL – I wanted a security plug-in. This week – I went for my old stand-by I themes Security which use to be WP Security. The site ran fine with this on – but the membership activation from the sing-up form for new or renewing members would not allow the plug-in to connect with Pay Pal. So I had to deactivate it and the problem disappeared – do you have any security plug-in that you know of that will not conflict with M2 ?

    I really owe this people a solution we had so many issues with this plug-in and they have been very patient – PLEASE talk with the management at WPMU and see if someone there may have solutions to this issues – I have activated the support on the site.

    Thank you very much for your help!

    Larry Davis

    PS – I have added the attachments to the next post

  • Nithin
    • Support Wizard

    Hi Larry Davis,

    1. Pay Pal Issues – We are using the PP std. gateway – because the PP live-single gateway was causing a problem not letting member's renew – BUT now Pay Pal sends out an email that a recurring

    profile has been created and then another email saying that this profile is canceled. It still records single payment for the std. membership (that is set-up for one payment infinite date range of 1 year).

    PayPal standard gateway will handle all payment types, however for permanent memberships you'll see such message from PayPal as shown in your screenshot during checkout, but it'll work as intended.

    I checked your website, and I could see that the subscription ended, but it looks like the subscription is still active, and the user still have access to the content. If you are looking to implement the PayPal Standard Gateway, please try the (Setup automatic matching) option from the billing for the current user to fix that.

    You can find the option under, Membership 2 > All Membership, as shown in the screenshot, and once you click that, the link under the Payments will lead to the transaction logs.

    If you don't want PayPal Standard Gateway for permanent membership because of the message as shown in your PayPal screenshot, you can make use of PayPal Single Gateway payments.

    To check why PayPal Single gateway wasn't working, I would like to test that extensively in your system, but since your website is live, and you are using Live Payment gateways, I'm not able to test that out. Maybe we could switch to a sandbox account? Or it will be apt if you could create a staging website, so that it would be easier for us to troubleshoot this further?

    Please check this link, on how to setup a staging environment:

    https://premium.wpmudev.org/blog/testing-environment-wordpress/

    Please do let me know how you want us to troubleshoot this, the issue with Single PayPal gateway seems to be site specific, as it works fine in my system. Since you have already mentioned that your current security plugin is also causing conflicts with PayPal, would recommend you to run a plugin conflict test just to rule out whether any plugin is causing this issue. Please check this link for more info:

    http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    2. Multiple automated emails from the system – the additional script to the wp-conf. file to limited only one email per 24 hours was working up to a couple of days ago but I see from a test membership I ran a couple of days ago (which is set for a 10 day period) I started receiving emails again today 3 in a row one hour a part. I know one of the issues before is that we wanted to make sure "copy to administrator " on this automated emails in unchecked

    This only happened once, or are you able to replicate this again when new users signup? I'm afraid this seems to be a bug, that has already been reported, and the developers are working on this at the moment, on getting this fixed. Will keep you posted once I get an update regrading this asap.

    3. WP Security Plug-in – the client in the past had had their old website hacked and though we have an SSL – I wanted a security plug-in. This week – I went for my old stand-by I themes Security which use to be WP Security. The site ran fine with this on – but the membership activation from the sing-up form for new or renewing members would not allow the plug-in to connect with Pay Pal. So I had to deactivate it and the problem disappeared – do you have any security plug-in that you know of that will not conflict with M2 ?

    This is odd, there isn't any know conflict with the plugin you have mentioned. Have you tried the Defender plugin, it should work without any issue.

    https://premium.wpmudev.org/project/wp-defender/

    I hope, I have covered all you queries, please let us know how that goes, so that we could give a closer look at your system. Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    I’m sorry for the long delay – I had some health challenges caused me some obstacles at my agency the last couple of months – but I’m back at work – unfortunately the client is still fighting all these problems and one new issue where the dates on members signing up or renewing in some cases get extended to 2 years instead of one year and we do not even have this as an option in the memberships.

    I working today on getting a sandbox test account set-up at Pay Pal – so we can re-address problem number 1 listed in my last post. Because of the size of the site we really would like to avoid trying to clone this site on our server. But maybe we can try a sandbox test first to determine if the PayPal Single Payment is still a problem.

    Has any development been made on the plug-in sending multiple unwanted emails?

    I hope to test the defender plug-in this week.

    Thank you!

    Larry

  • Larry Davis
    • Site Builder, Child of Zeus

    Hi Nithin-

    I talked to great length with Pay Pal today and I guess since we are not the developer and you are, the Pay Pal Sandbox account does us no good. The situation is the Pay Pal believes that we need to use the single payment gateway not the standard since this is what is generating the unwanted reoccurring profile.

    My question is this – in our situation where we have one year memberships for one fixed payment – after the membership has expired the user in now converted to a visitor – their user profile is still in the system. Will the Plug-in allow a user to renew for another year without an error at Pay Pal?

    I’m sure you have a sandbox account to test this from. I have switched the payment method back to PayPal Single payment and have gave you access.

    Thank you!

    Larry

  • Kasia Swiderska
    • Support nomad

    Hello Larry,

    Putting site under maintenance won’t work – because we have to test this as visitors so we need to have access to registration form to go through all the process of the getting membership.

    I can do those tests in around 10-15 minutes, so I can change for that short period gateway to sandbox, test and then switch back to live mode? How does it sound for you?

    My question is this – in our situation where we have one year memberships for one fixed payment – after the membership has expired the user in now converted to a visitor – their user profile is still in the system. Will the Plug-in allow a user to renew for another year without an error at Pay Pal?

    We will have to also check that. With sandbox account I can also setup test for that one your site and we can see what could be issue there.

    kind regards,

    Kasia

  • Larry Davis
    • Site Builder, Child of Zeus

    Thank you-

    I have switched the Pay Pal to single payment and I successfully renewed the $1 Test Membership.

    This is very limited testing but at this point it appeared to work. OK –

    I also went through and I had to correct nearly all of the members length of membership – even though we have the plug-in setting set at 1 year the renewals and some of the sign-ups were setting an expiration date at 2 years. I would sure like to know if this problem is also related to the Pay Pal communications or something else.

    I was able to install Defender at it appears to be running OK.

    Yes you can place it under a sand box test and that will be fine – I would very much like to know your evaluation of the Pay Pal Single Payment for new and renewing members and what you believe might be causing the extra membership length extension and finally the status of the multiple emails – even it appears to happening less.

    Thank you!

    Larry

  • Nithin
    • Support Wizard

    Hi Larry Davis,

    Hope you are doing good today. :slight_smile:

    Thanks for keeping us updated, I switched to a sandbox, and then tried to register, but unfortunately a new error popped up. I’m not able to register successfully, because of the following:

    This might be related to one of the plugins in your system. To be sure, you’ll have to run a plugin conflict test. It seems like you are running WordPress 4.5.7, if possible please do update it to the latest version 4.7.3.

    Is it okay, if we could just disable all the plugins except Membership plugin, so that we could test the issue with M2 plugin? If yes, could you please send us your credentials, to have a better idea about the current issue, and also test all the issues related to PayPal too.

    You can send credentials by using our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    – To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas

    -WordPress admin username

    -WordPress admin password

    -login url

    -FTP credentials (host/username/password)

    -link back to this thread for reference

    -any other relevant urls

    Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.