Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

add to cart- items go in and disappear (wordpress)

Options
  • 03-03-2016 12:40am
    #1
    Registered Users Posts: 313 ✭✭


    Hi,

    Went live with a new site today (www.rainandconker.com)

    From most browsers- if you add to cart the item goes in and disappears within 2 seconds. My developer can't figure what it is - he has emailed the template developer (flatsomme) but still waiting to hear back and panicking a little. The SSL was transferred this evening (from another site )- could this cause issues? Or maybe some plugins?

    Has anyone any ideas what it might be ?


Comments

  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    You say "For most browsers" - What browsers does it work on?

    It is worth changing to a default theme, like twentyfifteen. That theme is very well tested and follows WordPress coding guidelines. If that fixes it then it is likely a theme issue.

    Otherwise you have to go through each plugin and disable it. Start with the low priority ones like captcha, Yoast SEO, YITH Wishlist, MailChimp and then the Woocommerce ones (dynamic pricing, currency switcher).


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    Was it working before the SSL move?
    Are php sessions working properly, how are they configured?
    Can you see any errors in your server/site logs?


  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    MizMix phoned me. I enabled WP_DEBUG and saw errors about 2 database tables not being found, one being a Woocommerce sessions one. Creating the tables has sorted out the Add to Cart issue.

    The root cause was likely an aborted database import (phpMyAdmin has a checkbox, which is checked by default, that will "Allow the interruption of an import in case the script detects it is close to the PHP timeout limit."


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    daymobrew wrote: »
    MizMix phoned me. I enabled WP_DEBUG and saw errors about 2 database tables not being found, one being a Woocommerce sessions one. Creating the tables has sorted out the Add to Cart issue.

    The root cause was likely an aborted database import (phpMyAdmin has a checkbox, which is checked by default, that will "Allow the interruption of an import in case the script detects it is close to the PHP timeout limit."

    Nice work daymobrew, I'd imagine there was much relief when you worked that out.

    Nice site btw MizMix.


  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    Let me describe how I solved this issue, so that it might help others.

    I spoke with MizMix and asked for the control panel login and to asked for a new account on the website (so that it admin password is not disclosed to me and my account can be disabled or deleted later).

    Within WordPress things looked okay. Two minor plugins needed to be updated (I didn't touch them) and the theme was out of date too (the ChangeLog of the newer version mentioned ajax add to cart fixes for variable products!).

    I enabled WP_DEBUG (just for me). I added the following to wp-config.php:
    [PHP]if ($_SERVER == '123.456.789.123') { // My IP
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors', 0);
    } else {
    define('WP_DEBUG', false);
    }[/PHP]
    I refreshed the front page and tried to add an item to the cart.
    I then looked at the debug file (/wp-content/debug.log) (Note to self: add .htaccess file to limit access to this file to my IP).
    I saw errors about 2 database tables not being found!

    I logged into the control panel and opened phpMyAdmin and confirmed that the tables were not there. I made a db backup.

    I searched the WordPress and Woocommerce source for the definition of those tables and then copied the 'CREATE TABLE' code for each table into a SQL box within phpMyAdmin.

    I deleted the debug.log file and tried to add an item to the cart. It worked. I was able to view my cart and begin the checkout process. The debug.log file remained empty.

    The "interrupted import" is a guess based on what MizMix said that the developer said last night. The db was 21MB (not huge) but the upload could have timed out if the max_exection_time was short. A gz upload might have helped.

    I was expecting a complex issue so I am glad that it was such a simple solution (I had a lot of other stuff to do on other sites). A good bit of the 30 mins working on the issue was spent creating a ftp account, logging in, searching source code and other admin stuff.


  • Advertisement
Advertisement