MarketPress - 500 Internal Server Error on Checkout

Staff: James Morris

When stepping through the checkout process and using a coupon (logged in or as guest), when you get to the final step a 500 Internal Server Error is generated on the /checkout/ page, but no related debug.log output is generated.

Plugin conflict test was performed.

Access details in chat log.

  • Panos
    • SLS

    Hi Steve - Think BiG ,

    I followed up the issue on your chat conversation you had with James, I tried accessing the checkout page you shared with your screenshot, it now seems to be loading for me. Could you please confirm if it's still not loading for you or if I should be looking elsewhere?

    Sharing a screenshot with what I get:

    Thanks!

  • Steve - Just Think BiG
    • Thinking Bigger

    Hi Panos,

    You've not read the conversation I had with James, properly. You have to go through the purchase cycle because it's the final confirmation page that isn't displaying/working correctly.

    Buy the product 'The Clarity Lounge' @ £27, enter the coupon code AMAZON2017 which gives a £27 discount on that product, making it free, then proceed with the purchase. The final confirmation page doesn't display and the confirmation emails aren't being sent, however, the sale does appear in the control panel.

    The problem is, customers that try to go through the process don't appear to complete, they get an error message of some kind (which can be different for different people) and they receive no confirmation emails, all of which is a bit of a problem.

    Regards,

    Stev

  • Panos
    • SLS

    Hi Steve,

    You're right, sorry, I missed reading some information. Could you please unlock ftp so I could add some checkpoints and see where this issue starts appearing? I'm afraid I can't say how long it would take cause it depends on the type of the issue, I will let you know when I would be done with tests so you can lock it back again. If possible to unlock completely, as the next time I'll be on I'll have different IP. This is temporarily for as long it takes to find the issue.

    Could you also confirm that the same happens after paying with PayPal and using other products?

    Thanks!

  • Panos
    • SLS

    Hi Steve - Think BiG ,

    The problem is that pretty often I need to change my IP so each time you will have to whitelist it again. If it is OK with you, you can unlock until we're done with this issue.

    I wasn't sure at which point does this issue arise. In the beginning I was suspecting the free_order.php or the class-mp-checkout.php. It now seems to be in the MP_Order::save() function.

    Best way to debug is by using php's error_log function http://php.net/manual/en/function.error-log.php. When used in WordPress this will print some output in file wp_content/debug.log file. Problem is that this function doesn't print anything on debug.log so it's hard to debug.

    I tried forcing it to print to a specific location but didn't work either:
    error_log("My message", 3, "/localpath/wp-content/mu-plugins/errors.log");

    Only way to debug is to set that function to print log and send to email. Not sure if you would like your server sending out emails though.

    Could you please contact your host if possible to allow error_log to print either in wp-content/debug.log or other place which I could have access?

    You can lock ftp access again and unlock when you have news from host.

    Thanks!

  • Panos
    • SLS

    Hey Steve!

    Debugging requires allot of tests and it would be very helpful if your host could do this favor. If not I would be asking you several times to send in debug file.

    Lets start with the first log file to see if there is anything in there that could give a clue.

    First I would like to ask to keep a backup of your current log file on your desktop and rename the one you have on your server by adding a prefix like "__BACKUP__" or a custom file extension eg ".log.back". I'm asking this so we have a smaller file to check and also so that we can restore your previous log file without filling it in with our test logs. You can off course skip this.

    Before sending the log, I have attached a modified file containing some checkpoints which should print in the log file using error_log. Could you please replace file
    wp-content/plugins/marketpress/includes/common/class-mp-order.php
    with the one attached here?

    Then run a test purchase and fetch the log file and compress it (zip it).

    If you can't attach a zip file in your reply here, you can upload it on your drive or dropbox etc and share the download link. You can share the download link here but I would suggest to send that privately in case the log file contains any sensitive information. You can send through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: "Attn: Panos Lyrakis"
    Also include a link back here for reference.

    If current log file isn't helpful would it be ok to make the error_log to send logs via email? Another option is to share cpanel info if it is ok with you.

    Thanks!

    • Steve - Just Think BiG
      • Thinking Bigger

      Hi Panos,

      Apologies but I've been away but am now 'back in the saddle' and I certainly do still need to get this sorted out please.

      With my host, I can't access the log files directly on the server but I have replaced the wp-content/plugins/marketpress/includes/common/class-mp-order.php file and attempted an order (which still has the same problem).

      I tried to upload the error logs via your contact form but can't see any way to add a file to upload it, so, I've granted you temporary access to the site's control panel, as you suggested, and sent you log in details via the contact form link you sent.

      You can access the logs from the control panel (first icon on the top row), as well as most other things.

      Looking forward to hearing how you get on.

      Kindest regards,

      Steve

  • Panos
    • SLS

    Hey there Steve - Think BiG ,

    I have been doing several tests but still haven't managed to find the reason causing this. Even with access granted I have no access to any debug log files which makes it harder to investigate.

    I have been using error_log to send email with log info via email.

    This is not normal behavior of plugin, I am suspecting cookies or session issue here but I have asked the opinion of developer too. I'm sorry this takes so long. I will keep you updated since I hear back from dev.

    Cheers!

  • Steve - Just Think BiG
    • Thinking Bigger

    Hi Panos,

    I can acces debug logs and let you have them, although I thought you could also access them via ftp. I just need to unlock it for you.

    Let me know what you need and please keep me updated. This is rather frustrating because i have a client that's becoming increasingly frustrated, as well.

    kindest regards,

    Steve

  • Steve - Just Think BiG
    • Thinking Bigger

    Hi Panos,

    You replied on the 23rd may and I replied to you the same day. However, another BIG chunk of time has gone by, since then, and I still haven't heard anything from you.

    Are you taking this problem seriously?

    Given that I originally posted on the 2nd May and a month's gone by now, it doesn't look like it.

    I'm getting really fed up of how long it's taking to get this problem resolved and the almost total lack of response since 15th May.

    I'm happy to do whatever I need to do to help you guys but I need your support, which is what I'm paying for.

    Can we get this sorted as soon as possible please?

    If it needs escalating in some way, how do I go about doing that?

    Regards,

    Steve

  • Panos
    • SLS

    Glad it works fine on your side too :slight_smile:

    After following functions path to find at which point it stops working, it originally pointed to notifications functions. But nothing did make sense until some hooks were commented out.

    It started working after deactivating the "Disable for free products" option in the PDF Invoice settings. But strangely it kept working after it being re-activated. I tried to find out what could be issue in the pdf files but nothing found there :disappointed:

    Honestly I can't provide an explanation for this but I am still happy it's working now :slight_smile:

    Kind regards,
    Panos

  • Steve - Just Think BiG
    • Thinking Bigger

    Hi Panos,

    In that case, I'll keep my fingers crossed that it continues to work ok :slight_smile:

    It never feels especially satisfying when you don't know why something starts to work. Just makes you feel like it could all go wrong again.

    As I said. Fingers crossed!

    Thanks for your help.

    Regards,

    Steve

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.