Questions tagged [session]

Denotes questions about session management in Magento.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Magento 2 | Varnish cache pages per session

We have a magento 2.2.6 shop, with 20k products. We use varnish for fpc. It is configured properly, and we can verify by visiting a page two times. The second time the ttf is really low. Problem is ...
1
vote
0answers
14 views

Why do I see action notification messages on other pages?

Sometimes when I added products to the cart or I type wrong my password, I see the warning message in the checkout success page. How could I fix it?
4
votes
1answer
41 views

Is the session table supposed to be cleaned up automatically?

So we have a 20 Mio rows, 20 GB size session table. Is this supposed to be cleaned up automatically and that is a bug in our customization or is this a feature? I will run DELETE FROM session ...
0
votes
2answers
59 views

how to change customer session data in Magento 2?

after customer login, I want to change some of the session params like customer name. I do like this $this->_customerSession->getCustomer()->setName("ddddddd"); also i tried this $this-&...
0
votes
0answers
19 views

Getting Session Handler Exception when reloading the cart page after adding the product and with price update from Magento 2 admin

I am getting the Session Handler Exception 1 exception(s): Exception #0 (Exception): Warning: SessionHandler::read(): Unable to clear session lock record in /home/aba7pels9rrm/public_html/vendor/...
0
votes
0answers
28 views

Magento 2: How to get Browser Session ID in custom module

I need to get Browser Session ID in my custom module. Does any have idea how to get Browser Session Id in custom module. Any help would be appreciated. Thanks!
0
votes
0answers
10 views

Magento2.3.3 fresh installation getting error customer-data.js [object Object] only in firefox

With Magento 2.3.3 fresh installation without any modification I am getting error at console customer-data.js [object Object] This happens only in Firefox and not in Chrome. Tried flush and reindex ...
0
votes
0answers
19 views

Provide selected products from product_listing.xml

i have new page, with uicomponent form. And i have button in product_listing.xml uicomponent, with URL to this new page. I need to pass all product IDs that were selected in product_listing.xml to my ...
-1
votes
2answers
42 views

Magento2: How to set custom session in controller?

How to set custom session in my controller ? I'm set the session in controller but I got an interceptor error in Magento2.
2
votes
0answers
40 views

Redirect to Magento2 website with session id

We have a small requirement like a punchout payload concept. The user will redirect to Magento 2 website from 3rd party with the session_id. We want to capture that session_id and implement our logic. ...
1
vote
0answers
22 views

Magento 2 set and access variables between controllers

I have a problem with storing and accesing variables accross controllers. i have controller 1 there i set variable ( tried registry and session ) in block of that controller i have both and registry ...
1
vote
0answers
17 views

Admin session time out issue in Magento 1.9

Admin Config settings: System => Configuration =>Web => Session Cookie Management => set Cookie Lifetime 259200. And Go to => System => Configuration => Admin => Security => set Session Lifetime ...
1
vote
0answers
16 views

Export sessions data from files to REDIS

We are moving from single server to multiple server setup for our store. The problem is that we are using file cache type and we want to preserve those sessions (long expiration, per management ...
1
vote
1answer
92 views

Redis Session Error: Successfully broke lock for ID sess_ebfc12b22fa8c8e1fb81dca122fcdda6 after 5.01422 seconds

I am using Redis to store sessions and getting the error: [2019-11-26 09:51:32] main.INFO: ip-10-0-0-78|28852: Successfully broke lock for ID sess_ebfc12b22fa8c8e1fb81dca122fcdda6 after 5.01422 ...
0
votes
0answers
36 views

Magento 1.9 Storing JWT in Server to Server communication

Storing JWT in the server side is a bad practice. But most of the time we say that in the context when the API calls are made from the client side. Currently I am doing an implementation where from ...
0
votes
0answers
12 views

Cookie Management

Looking at adding functionality to the Cookie consent, instead of just accepting them I would like to add a new button which takes you to the a new page where you can select which cookies you would ...
1
vote
0answers
15 views

Magento 2 - Empty Cart and Quote behaviour

When the session quote has no visible items should it be set as inactive or still kept as active? Does anyone know how to do it? Thanks in advance.
0
votes
1answer
47 views

Why do I need the SID in my URL?

Since I installed my store I see the SID code in my URLs but I don't know why it's there, I found an option in my admin panel to disable it. Could you explain to me why do I need it?
0
votes
0answers
16 views

Many session files are being created?

Magento 1.9.3.7 I installed the latest patches (10570,10752,10888,10975,11086,11155,11219) today without any problems. Now I figured that the /var/session folder had about 5.5 million session files! ...
0
votes
0answers
8 views

Session unsetting itself every time I navigate away from a page

I need to be able to store some custom session variables that exist for the custom, regardless of whether they're signed in or not, but for some reason my sessions keep deleting themselves. I have ...
0
votes
1answer
62 views

Magento 2.3.2 Autoscaling and User Sessions

We have magento running on AWS Fargate behind a load balancer. It works great when it is not scaled(i.e only one task is running), however when it scales to 2 or more tasks I am not able to login as a ...
0
votes
1answer
328 views

Error “Your session has expired” when click on add to cart in magento 2.3

I am new in magento, I am creating website in magento 2.3 and I have installed FreeGo theme in my magento website. But when i click on product's add to cart then it's giving me error--> Your ...
0
votes
0answers
25 views

magento 2 too many session file

I know it may be asked before that for Magento 1 and I remember that I had this problem and fixed it by below config in php.ini session.gc_probability = 1 session.gc_divisor = 1000 session....
0
votes
0answers
19 views

Magento 2.2.9: wrong data when creating Customer Session from Session Factory

I´m trying to get Customer data and insert it into some hidden inputs on a form. It checks if there is a customer logged in, but the data is from another customer, and it doesn't change even if I log ...
0
votes
1answer
25 views

Account get log out after editing account information

I have a problem with Magento 1.9.3. When I log in as a customer and I make changes to my account information, such as name, last name, etc, and I click save I get logged out. Sometimes everything ...
0
votes
1answer
36 views

Magento 2 : Setting session variable not working

I have a problem with session variable. Basically it's not working and ruining what is working. Here my code : app/code/vendor/CustomerZipCode/Block/Ziplist.php <?php namespace Vendor\...
0
votes
0answers
33 views

Magento 1.9 Frontend-Sessions

We have a Magento 1.9 installation, which we've moved from one to another server. We did an update from 1.7.2 to 1.9. Since we did that, the frontend sessions seem to get cleared within a time span of ...
1
vote
0answers
80 views

Magento 2.2.8 session_start slow in profiler

We have multiple Magento 2.2.8 websites on one domain (domain.com = Website A, domain.com/store = Website B - separate customer accounts, but often people are registered on both). We're having ...
0
votes
1answer
38 views

Get Last Added Product ID of Cart without using checkout session

I am using RESTful APIs of Magento and I want to get the last added product id of in the cart. All of my searches are using the Checkout Session method of Magento which is $this->checkoutSession-&...
3
votes
1answer
84 views

Session value not set Properly in Logged users Magento 2.3

In my mobile number update module, logged user userId and mobilenumber set to .phtml hidden fields, but some times its not works properly ! please check my code app/code/{vendor}/{module}/Block/...
0
votes
0answers
15 views

Session lost after click Reviews Management in magento 2.2

Now, I using Magento 2.2. When I log in to the backend and click Marketing -> Reviews. After website load grid success. And click edit review or refresh website, then I lost session and website ...
0
votes
2answers
102 views

Magento 2 + Newrelic (slowest components)

I am using Magento 2.2.2 EE and getting slowest component from newrelic. env.php 'session' => array ( 'save' => 'files', 'save_path' => '/var/lib/php7.0/session', ), php.ini ...
0
votes
0answers
60 views

Share PHP session in frontend and REST API (Magento 1.9)

I am writing a few custom REST APIs for Magento1.9 and I was using a session to retain a couple of custom data (It's not a headless architecture). The session was working fine across all my APIs, but ...
0
votes
0answers
11 views

Magento2 Payment js

I have created an apple pay function session.onpaymentauthorized form this function I want to get an event when I add log in function body its ok but when I log as you can see in my code here I did ...
2
votes
0answers
26 views

How to get the data from the Session in a CustomerData Object without breaking the guidelines?

9.10. The Request, Session, and Cookie objects MUST NOT be injected in an object constructor. They MUST be passed only as method arguments. from the Technical guidelines How to comply with this rule ...
0
votes
1answer
54 views

Get session form key in javascript m1

In my product review form the form key fetched from core/session is cached and does not pass the validation upon form submission. So, Mage::getSingleton('cor/session')->getFormKey() and $this->...
0
votes
0answers
22 views

Set Variable to Session in Plugin. Magento2

is there a way to Set a Session Variable in my Plugin? If I do something like this: private $checkoutSession; public function __construct( \Magento\Checkout\Model\Session $checkoutSession ){...
4
votes
0answers
215 views

Magento2: Local-Storage Mage-Storage and Mage-Cache Empty on every Reload

Many features in my web page break as when I investigated, I found out that many local storage keys don't even exist now which used to exist before. list of keys that don't exist: lo_session mage-...
0
votes
1answer
27 views

Magento 1 : Showing chines text in var/sessoin file

Is there any idea about why some file are showing chines text in var/session ?
0
votes
2answers
101 views

Customer name not appearing and products not showing in mini-cart, Magento 2

I have Magento 2.2.6 version. After signin, customer name is not showing on top dropdown bar, however if I reload the page aur goto another page it then appears. Another issue is that when adding ...
0
votes
0answers
123 views

Magento 2.3.1 getting error “Your session has expired” while product added to basket

The strange thing is that this is only happenings on listing pages and not on PDP. I get a 404 on the following js files: pageCache.js addToWishlist.js amazonCore.js I'm running Magento 2.3.1 ...
0
votes
0answers
54 views

Change store view using code when starting session - Magento 2

I want to make a change of store view through code. I have created the next plugin for when the user logs in the system makes a change of store view, but the change is not maintained, I want to switch ...
0
votes
1answer
34 views

How to get quote details in helper

I want to see if there is anything exists in the cart if I am in a phtml page I have tried to use session and cart but I am getting null When I tried to use session I wasn’t sure how to get the ...
1
vote
1answer
81 views

Customer session loggedIn() not working Magento 2

I have to check whether a customer is logged in or not. It only works for My account page and for the rest of the pages, it gives a null result. It was working before. $objectManager = \Magento\...
1
vote
0answers
73 views

How to get custom session in rest api calls?

I have created a custom session and it's storage with custom namespace. I have set some data in storage which I am trying to fetch in my api calls but not getting any data in session. I do get the ...
1
vote
0answers
159 views

Warning: session_regenerate_id(): Session object destruction failed. on Magento 2 Checkout

I have a Magento 2.2.4 running on a Windows IIS server. When entering checkout, I often get There has been an error processing your request error. When I check the error report, it says * ...
0
votes
0answers
66 views

Magento 2 - Call to a member function getId() on null, admin user ID

I have a custom module, and it's work perfectly in the past, and now I installed on a new Magento 2 project. and after that, I add the sample data module, and on setup:upgrade I get this error : ...
1
vote
2answers
851 views

Magento2.2 - - Failed to read session data

If you open the front end with multiple tabs in the browser, the following error is output:. Exception #0 (Exception): Warning: session_start(): Failed to read session data: user (path: /var/opt/remi/...
1
vote
0answers
37 views

Magento 1.9.4.0 order not creating

I have been working on integration of a payment gateway with Magento 1.9.4.0 it works perfectly and the orders are being created successfully. However, there is a case when the user tries to login ...
4
votes
2answers
268 views

Magento 2 products in cart from other session

Strange behavior in Magento 2.2.8! When I leave the page for a few minutes and then do a refresh, products from other user sessions are in my cart! 20 minutes refreshing and there are 17 products in ...