You get the error main.WARNING: Session size of … exceeded allowed session max size of … when adding items to an order in the Magento 2 admin area? There is an easy solution to that problem, just run the following…
Unable to add products to an order in the admin (Magento 2)
If you cannot add products to an order from the Magento 2 admin area, run the following command in your Magento 2 root directory:
|
1 |
php bin/magento config:set system/security/max_session_size_admin 0 |
That should resolve the issue.
Fixing Session size exceeded allowed session max size (Magento 2)
Do you receive the message main.WARNING: Session size of … exceeded allowed session max size of …when adding products to an order from the Magento 2 admin area? There is a simple fix: run the following command from your Magento…
Cart suddenly empty or user logged out after an Ajax request in Chrome (Magento 1)
Sometimes an AJAX request causes a Magento session to be lost. The shopping cart may suddenly be emptied, or a logged-in user may unexpectedly be logged out. One possible cause is a missing image that triggers a “404 Not Found”…
Setting and getting session values (Magento 1)
Use the below code to set and get Magento session values:
|
1 2 3 4 5 6 |
// set value $value = 123; Mage::getSingleton('core/session')->setValue($value); // get value $value = Mage::getSingleton('core/session')->getValue(); |
Session values cannot be read in Chrome or Internet Explorer (Magento 1)
Sometimes values stored in the session cannot be read again in Internet Explorer or Chrome.
|
1 2 3 4 5 |
// Set session value Mage::getSingleton('core/session')->setImageData($imgData); // Reading the session value returns null $imgData = Mage::getSingleton('core/session')->getImageData(); |
Try the following workaround. Open System > Configuration > Web > Session Cookie Management > Use HTTP Only, then select Yes. Reading and writing…