Rebel Tech Posted August 19, 2014 Share Posted August 19, 2014 Hi We are experiencing a lot of, what I assume is caching issues. Customers are complaining about not being able to log in (log in loop) and when adding items to the cart and trying to checkout, the site shows no items in the cart. Please see the picture which shows R0.00 in the shopping cart The one with the amount shows what it should be. If a customer clears his/her cache and cookies then the problem doesn’t happen. I have Cache, APC, PageCache and Cloudflare enabled Thanks Link to comment Share on other sites More sharing options...
JPresta.com Posted August 19, 2014 Share Posted August 19, 2014 If you are using cloudflare, maybe you should turn off browser cache feature in PageCache. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 19, 2014 Author Share Posted August 19, 2014 I will try this. I have also changed the following in CloudFlare Minimum expire TTL = 1 hour Auto Minify (Web optimization) = Turned off JS+HTML+CSS Rocket Loader™ (Web optimization) = OFF Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 19, 2014 Author Share Posted August 19, 2014 I have disabled Browser Cache in PageCache. I still see R0.00 carts. I have disabled CloudFlare for now. Link to comment Share on other sites More sharing options...
JPresta.com Posted August 20, 2014 Share Posted August 20, 2014 Can you reproduce the problem? Because at this time it's working good. If you know how to reproduce you could enable cloudflare back and see if it's still OK. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 20, 2014 Author Share Posted August 20, 2014 Product still exists. I have turned off PageCache and Cloudflare 3851 Non ordered Customer 1 R469 -- 2014-08-20 10:28:40 View 3850 Non ordered Customer 1 R10,593 -- 2014-08-20 10:28:03 Not sure why it is doing this. Customer says he had to start adding products again after he tried to checkout but it said the cart was empty. Cart ID has changed Link to comment Share on other sites More sharing options...
JPresta.com Posted August 20, 2014 Share Posted August 20, 2014 Product still exists. I have turned off PageCache and Cloudflare 3851 Non ordered Customer 1 R469 -- 2014-08-20 10:28:40 View 3850 Non ordered Customer 1 R10,593 -- 2014-08-20 10:28:03 Not sure why it is doing this. Customer says he had to start adding products again after he tried to checkout but it said the cart was empty. Cart ID has changed This is weird specially if he is logged in. Is he the only customer having this problem? What browser is he using? Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 20, 2014 Author Share Posted August 20, 2014 I wish he was I asked him to send me a message about the problem "couldn't log in so I deleted the cookies for your domain and then it worked that's all I noticed really, had the same thing on my other PC last night actually" He is using Chrome but tried in Firefox. IE works since he never had cookies/cache from the site before. Link to comment Share on other sites More sharing options...
JPresta.com Posted August 20, 2014 Share Posted August 20, 2014 Ok, so if you are seing multiple carts it's because he deleted cookies and also because he changed browser. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 20, 2014 Author Share Posted August 20, 2014 The carts problem was this morning (and last night) while the login was before that. He started redoing his shopping cart after he cleared his cookies&cache but it gives him the error of the empty cart so he started again (without clearing cookies and cache). Link to comment Share on other sites More sharing options...
El Patron Posted August 20, 2014 Share Posted August 20, 2014 I can try testing to see if I can help, thanks joemartin for your assitance as well (don't stop . what is front office url? I did not see it, also exact ps version please. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 20, 2014 Author Share Posted August 20, 2014 Thanks, The URL is www.rebeltech.co.za PS: 1.6.0.9 Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 21, 2014 Author Share Posted August 21, 2014 Around 6PM today, a few customers emailed/called/texted me about a log in problem. Clearing browser history and cache solves the issue - however, the customer shouldn't have to do this and PS should remove the cookies and cache when the browser is closed. Is there a way to force cookie/cache removal? Link to comment Share on other sites More sharing options...
El Patron Posted August 21, 2014 Share Posted August 21, 2014 are you running a caching program (on host) or PS file cache? if so I recommend turning off for now. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 21, 2014 Author Share Posted August 21, 2014 (edited) Zero caching agents are enabled both on host and through PS. I have created a forge report http://forge.prestashop.com/browse/PSCFV-12461 Edited August 21, 2014 by Rebel Tech (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted August 21, 2014 Share Posted August 21, 2014 Zero caching agents are enabled both on host and through PS. it's possible your host has cache you do not see from ps, i.e. varnish cache for example, you may want to check with them on this point. sorry I do not see this as a core ps issue, if I could find anything I'd certainly offer it to you. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 21, 2014 Author Share Posted August 21, 2014 I have asked them - should get back to me shortly. El Patron, any idea about combining carts? I.e non-logged in customer adds a product to his/her cart and when he/she logs in the existing and new cart are combined. Doesn't work on my site. Link to comment Share on other sites More sharing options...
El Patron Posted August 21, 2014 Share Posted August 21, 2014 I have asked them - should get back to me shortly. El Patron, any idea about combining carts? I.e non-logged in customer adds a product to his/her cart and when he/she logs in the existing and new cart are combined. Doesn't work on my site. not sure, your shop scares me a little. we hope everyone works out of the box but gets more difficult when there are so many hosting platforms, themes and modules. I think it a good idea to clone a shop or create at least a base install of your version to see if difference running one from the other. This an help narrow down area's of issue. make sure your domain and ssl domain are the same...but typically we see your issue when there is underling cache...but not always... maybe Mr. Martin will revisit here he is expert at cache, I prefer like mr. Martin prefer modules specifically for ps to speed up core, i.e. static cache, move java bottom etc. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 21, 2014 Author Share Posted August 21, 2014 (edited) When you say my shop scares you - what do you mean? domain name and ssl name are the same (www.rebeltech.co.za). There is no cache enabled - as per the host providers "There is no cache running on the web server or php side. LiteSpeed cache is disabled on the server side. I have also checked your .htaccess file and removed the mod_deflate section." They have removed these lines ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" Why the "access plus 1 week" part? There are a lot of people on the forum that are having issues but their [solved] task(s) don't work for me. Edited August 21, 2014 by Rebel Tech (see edit history) Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 22, 2014 Author Share Posted August 22, 2014 So I managed to teamviewer into a customer's machine to view the shopping cart and login problem. There were two different cookie groups collected rebeltech.co.za www.rebeltech.co.za Any reason why the site is loading two different sets? SEO/URL is set to www.rebeltech.co.za in both options. Thanks Link to comment Share on other sites More sharing options...
JPresta.com Posted August 22, 2014 Share Posted August 22, 2014 They have removed these lines ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" Why the "access plus 1 week" part? You should keep these lines, this is Apache optimisations that tell the browser that it can cache CSS and Javascript for 1 week. By the way, you could set it to "plus 1 month" or more. Link to comment Share on other sites More sharing options...
JPresta.com Posted August 22, 2014 Share Posted August 22, 2014 So I managed to teamviewer into a customer's machine to view the shopping cart and login problem. There were two different cookie groups collected rebeltech.co.za www.rebeltech.co.za Any reason why the site is loading two different sets? SEO/URL is set to www.rebeltech.co.za in both options. Thanks This is weird because rebeltech.co.za is redirected to www.rebeltech.co.za with 301 which is fine. Maybe old customer that were there before redirection? Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 22, 2014 Author Share Posted August 22, 2014 You should keep these lines, this is Apache optimisations that tell the browser that it can cache CSS and Javascript for 1 week. By the way, you could set it to "plus 1 month" or more. I don't have optimization enabled while I sort this issue out. This is weird because rebeltech.co.za is redirected to www.rebeltech.co.za with 301 which is fine. Maybe old customer that were there before redirection? I thought so, the customer purchased from us 2 days ago and then again today. Link to comment Share on other sites More sharing options...
El Patron Posted August 22, 2014 Share Posted August 22, 2014 I would put a 'force' non-www to www or vice versa in .htaccess thanks for coming back Joe, on holiday? jajajaja Link to comment Share on other sites More sharing options...
El Patron Posted August 22, 2014 Share Posted August 22, 2014 also ensure bo-->pref-->seo & urls, that domain and domain ssl are the same. Link to comment Share on other sites More sharing options...
JPresta.com Posted August 22, 2014 Share Posted August 22, 2014 thanks for coming back Joe, on holiday? jajajaja No but I don't know much more on this issue 1 Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 22, 2014 Author Share Posted August 22, 2014 No but I don't know much more on this issue Thanks for helping - I do appreciate it. also ensure bo-->pref-->seo & urls, that domain and domain ssl are the same. Already done this. I would put a 'force' non-www to www or vice versa in .htaccess thanks for coming back Joe, on holiday? jajajaja Hmmm, good point. Let me try that. Link to comment Share on other sites More sharing options...
El Patron Posted August 22, 2014 Share Posted August 22, 2014 this article may help as you update .htaccess http://www.prestashop.com/forums/topic/2131[spam-filter]tip-15-16-and-custom-htaccess/ Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 22, 2014 Author Share Posted August 22, 2014 RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteEngine on RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] Look good? Link to comment Share on other sites More sharing options...
El Patron Posted August 22, 2014 Share Posted August 22, 2014 I think this is only part required, I don't recognize the 2nd part of that. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] here is good post on subject...(ssl considertion) http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www also for others, it's good idea to first check if mod_rewrite is enabled with IF, this you can see later in .htaccess, it's good practice because if you move shop or something happens to environment and mod_expires not avail, you get 500. Link to comment Share on other sites More sharing options...
Rebel Tech Posted August 22, 2014 Author Share Posted August 22, 2014 I think this is only part required, I don't recognize the 2nd part of that. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] here is good post on subject...(ssl considertion) http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www also for others, it's good idea to first check if mod_rewrite is enabled with IF, this you can see later in .htaccess, it's good practice because if you move shop or something happens to environment and mod_expires not avail, you get 500. I see rewrite is on SetEnv HTTP_MOD_REWRITE On I have made the changes and I will check have a look over the weekend. 1 Link to comment Share on other sites More sharing options...
El Patron Posted August 22, 2014 Share Posted August 22, 2014 I see rewrite is on SetEnv HTTP_MOD_REWRITE On I have made the changes and I will check have a look over the weekend. yes, please let us know...this issue is always about playing 20+ questions, thanks for your patience. Link to comment Share on other sites More sharing options...
Recommended Posts