3.0.3.7 Logout on new cart item refresh.
Hello.
If I log on and add an item to a new cart, view the cart, change the quantity (or not), use the refresh button, it logs me out immediately.
Log back in, do the same and it takes the change and keeps me in.
Further to that, if I use the browser back option to where I was logged in, it allows me to see items and prices then, when reviewing the items, it says I cant see items unless I'm logged in.
Any ideas please ?
Could be this issue. https://github.com/opencart/opencart/issues/7008
You may be able to test by using your web browser's developer tool to disable the cache.
The easiest way to fix the lack of cache control headers issue is by making the following change to the framework.
In system/framework.php find the following line at around line 74.
After that line add the following.
Note, using header() rather than $response->addHeader() as the later doesn't apply to redirects. I've noticed recently that Firefox aggressively caches redirects, which can lead to some strange issues.
You may be able to test by using your web browser's developer tool to disable the cache.
The easiest way to fix the lack of cache control headers issue is by making the following change to the framework.
In system/framework.php find the following line at around line 74.
Code: Select all
$response->addHeader('Content-Type: text/html; charset=utf-8');
Code: Select all
header('Expires: Thu, 19 Nov 1981 08:52:00 GMT', true);
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true);
header('Pragma: no-cache', true);
I edited it as suggested and it seemed to work, but after a few goes, it still does it.
Any suggestions ?
Any suggestions ?
Code: Select all
// Response
$response = new Response();
$response->addHeader('Content-Type: text/html; charset=utf-8');
// Added 20-01-23
header('Expires: Thu, 19 Nov 1981 08:52:00 GMT', true);
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true);
header('Pragma: no-cache', true);
// End Added
$response->setCompression($config->get('config_compression'));
$registry->set('response', $response);
Opencart 3.0.3.7.
Try clearing your browser cache after that change, as it still may be caching.
It it still doing it. Check both your OpenCart and PHP error log and also your web browser's developer console.
It it still doing it. Check both your OpenCart and PHP error log and also your web browser's developer console.
Who is online
Users browsing this forum: No registered users and 4 guests