Membership 2.0 payment issues - 502 error

We've been building a site using Membership 2.0 (VideoBiker.co.uk). It's been a long project & the site is not yet accepting payments. Around nine months ago, when we last checked, the configured Stripe payment gateway was working. Getting ready to launch a payment option, last week we tried to test the Paymentent links. They are returning a 502 error. This was on the live site. We've today updated Membership 2.0 to the latest version on our staging site and it too is returning the same 502 error when clicking on a payment link.

  • Dimitris

    Hello there Jez,

    hope you're doing good today!

    As the SFTP credentials you've kindly shared with us, doesn't have writing access, so I can't activate WP_DEBUG in wp-config.php file, could you please sort this out -if possible- and let me know here in your next reply?

    If this isn't something that you can do, please reply in our recent email conversation with some access of the live site, as we should be able to see the logs from both live and staging site via the WPEngine plugin. We will need the following info of live site:
    - WordPress admin (login url/username/password)
    - FTP credentials (host/username/password)

    Warm regards,
    Dimitris

  • Jez

    Let's see if this works first. I've reset SFTP file permissions so that you should have the required 'write' access + the following have been applied:
    define( 'WP_DEBUG', true );
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
    If the above does not give you the required access - remind me of the secure contact form again and I will set-up admin access to 'live' - although I'm pretty sure that you already have that too. Thank you for your attention to these issues.

  • Dimitris

    Hello there Jez,

    hope you're doing good today!

    I was still able to see that WP_DEBUG was set to false, but the updated SFTP permissions let me activate it eventually. I then found a memory leak error message, so I've also added the following lines in wp-config.php file:

    define('WP_MEMORY_LIMIT', '1024M');
    define('WP_MAX_MEMORY_LIMIT', '1024M');

    After doing so, I was still seeing the same 502 Bad Gateway - nginx error, when I was trying to buy a new membership with my testing user (username: dimitriswpmudev), but this time debug information were empty.
    FYI I was also getting the following error message in browser's console at that time:
    The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

    I then deactivated all plugins apart from WPMUDEV Dashboard and Membership 2 Pro and now next screen upon payment is getting loaded pretty fast, without any errors.
    As this is some kind of conflict with another plugin, I'd like you to carry on with a conflict test as shown in next flow chart: https://premium.wpmudev.org/wp-content/uploads/2015/09/Support-Process-Support-Process.gif
    Concept here is to activate the remaining plugins one-by-one, checking the payment process each time, until you find the conflicted combination of plugin(s) that causes that.
    Please let us know here in your next reply about your findings!

    Warm regards,
    Dimitris

  • Jez

    Working on the staging site - we changed the prices and clicked on the 'remove coupon' link - resulting in the site crashing. This is a big worry - especially coupled with the word 'beta'. ps. Did you install 404page plugin?

    Have gone through a process of elimination - not 100% to your prescribed format, but close to it. We reactivated plugins one at a time. Activating Yoast, after a long list of others resulted in the 502 bad gateway. We the deactivated all plugins and only activated Yoast - resulting in the same error. Yoast is one of the most used plugins for WP and is important to this site. Where should we go from here?

  • Dimitris

    Hello there Jez,

    hope you're doing good today and really appreciate the feedback here!

    There's a know issue with Yoast SEO plugin which is affecting Membership 2 Pro (as well as other plugins), and we're waiting for some update from their developers.

    You can track the issue here: https://github.com/Yoast/wordpress-seo/issues/8218

    There's also a little workaround that you could try to use in this comment, even though it didn't work for some other members: https://github.com/Yoast/wordpress-seo/issues/8218#issuecomment-344647526

    Meanwhile, you can use our SEO plugin instead of Yoast SEO, SmartCrawl Pro.

    we changed the prices and clicked on the 'remove coupon' link - resulting in the site crashing. This is a big worry - especially coupled with the word 'beta'. ps.

    I don't quite understand the steps you followed there, could you please elaborate a bit more on this? But first, please test with Yoast SEO plugin deactivated, so we ensure that this isn't the same bug as above.

    Did you install 404page plugin?

    I didn't install any plugin in your site, I would have mentioned that already, if so.

    Warm regards,
    Dimitris

  • Jez

    Thanks for the ongoing support Dimitris and whilst it's appreciated, I'm a little confused. Why have we gone through a long process of trying to work out what is wrong when all along, there is a known issue with Yoast? Looking at GitHub, this issue is two months old - has there been any progress from or with the Yoast developers since this time? Our website was over 600 pages that utilise Yoast - the majority have been hand crafted. If using Smart Crawl is our best solution here, is there a way of transferring Yoast data to Smart Crawl so that we don't loose two years of 'Title' & 'Description' customisation?

  • Jez

    One further quick question, with Membership 2.0 shortcodes, is the following a concern?

    Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method MS_Rule_Shortcode_Model::debug_protect_content_shortcode() should not be called statically in /nas/content/staging/videobiker/wp-includes/shortcodes.php on line 345

    This shows up on the staging site where there are Membership 2.0 shortcodes. e.g. home page.

  • Dimitris

    Hello Jez,

    hope you're doing good today!

    Thanks for the ongoing support Dimitris and whilst it's appreciated, I'm a little confused. Why have we gone through a long process of trying to work out what is wrong when all along, there is a known issue with Yoast? Looking at GitHub, this issue is two months old - has there been any progress from or with the Yoast developers since this time? Our website was over 600 pages that utilise Yoast - the majority have been hand crafted. If using Smart Crawl is our best solution here, is there a way of transferring Yoast data to Smart Crawl so that we don't loose two years of 'Title' & 'Description' customisation?

    The issue in your website wasn't confirmed at the beginning, as soon as I've confirmed that, I let you know. I'm sorry about any latency on this, I wasn't able to narrow this down to Yoast plugin before though.
    As for SmartCrawl, there's no integration made between this and Yoast plugin, so it's settings should be set separately.

    And just adding to my thoughts above, does this issue with Yoast, preclude the need to use a 'beta' version of Membership 2.0 or would the 'non-beta' version work as intended if Yoast was not installed?

    Beta version includes some fixes, but unfortunately neither beta or latest stable version, work well with Yoast at this time.

    One further quick question, with Membership 2.0 shortcodes, is the following a concern?

    There's no concern about this, it shouldn't cause any issues at all.

    Warm regards,
    Dimitris

  • Jez

    Ok - thank you for your reply and I just need to clarify further...

    (1) Can you point me to a list of Membership 2.0 plugin conflicts, so that we can avoid this situation happening again?

    (2) On Thursday afternoon, we will be deleting Yoast from the live site. Owing to the amount of work that has continued on the 'live' site, we are unable to safely 'push' any developer changes from 'staging' back to 'live'. This has been compounded by another developer carrying out fault finding on a separate issue relating to some PTB elements. So my question is, with Yoast deleted, do we need your 'beta' fix or will the standard latest version be stable to allow us to launch payment gateways by Sunday. And if 'beta' version is required, please could your developer replicate his 'beta' mods to the live site for us please.

  • Dimitris

    Hello there Jez,

    hope all is good for you today!

    (1) There's no such list of plugins conflicting with Membership 2 Pro, the best way to keep track of any changes/conflicts, is by having a staging site and first update any theme,plugin or even core WP in there and further test. If all is good, you can carry on by updating live site.

    (2) There's been a recent release of v.1.1.2 lately so no beta version should be required anymore. Please do let us know though, if latest version is causing you any issues, we will be more than happy to further investigate it.

    Take care,
    Dimitris