A site I manage suddenly (potentially 2 weeks ago - from GA stats, and only reported now) started dropping the cart items when you view the cart, or go to checkout.
The top 'mini-cart' shows the items in the dropdown, until you browse to cart/checkout, and you then end up on the cart, with 'There are no items in your cart' message.
Seems like a session issue. It does not happen when logged in.
Removed all session validation options in 'system->web->session validation settings', and enabled the one that says 'Use SID on Frontend'. This did solve the issue, but since these settings did not change in the last 3 months, I know there is some underlying issue.
This then points to issue with sore-id issue? Somehow the site is loosing what store-id it is on, and dropping the session/cart data? Maybe some observer/event/rewrite by some module.
I cannot replicate the issue on local dev, or on UAT server. DB on UAT is 2 weeks dated from live, so this could point to a db issue/setting?
Things I am trying: I am busy pulling current live db over to UAT to get that up-to-date , to see if I can replicate the issue there. will update when that is done.
Once I can replicate the issue in a non-live area, I will systematically disable modules, see if something is mucking about with store id's (starting with MageMonkey and sweettooth, since they got updated 2 weeks ago)
Question is - what else can I try? Any pointers to where I can whack some breakpoints and step the code to see if I can trace this issue?
there are no extra cache systems like varnish or memcache installed. Server is a standard cpanel install. testing on uat I disabled all cache.
further update : it would seem that when I drop to the default theme I cannot reproduce. I am systematically moving theme override folders back.
I also used git to backtrack code and the issue remains with every hash.
Update: Been a while since I had time to spend on this. High work load.
I moved the sessions to file based and the issue has gone away. Since the client is not intending to use multiple servers in the near future, and due to my work load, this was left at that. Will most likely come back to bite me later.
magento support suggested the issue is related to sweet tooth module extending the session classes, but I have disabled that module, and the issue remained.
will update when I get more results.