All Questions
84 questions with no upvoted or accepted answers
6
votes
0
answers
806
views
Magento 2 The session id is too long
I am running Magento 2.2 on php7.1 and getting the following errors in my var/report and on my error log:
> {"0":"Warning: SessionHandler::read(): The session id is too long or contains ...
5
votes
0
answers
2k
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-...
3
votes
1
answer
634
views
How can I hide the errors session messages of my module?
In Magento 2, it shows an error which is really annoying for customers. How can we hide or remove showing those errors in the page?
Currently, the application is in the production mode. But still, ...
3
votes
1
answer
365
views
Can't access session into admin phtml file on Magento 2
I tried to set a session from a model file and access this on a phtml file like this and it's not working:
namespace/vendor/Model/ProcessModel.php:
protected $backendSession;
public ...
3
votes
0
answers
2k
views
Magento 2 SessionHandler error
Sometimes my magento 2 store returns this error
"Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/vhosts/domain.net/httpdocs/...
3
votes
0
answers
428
views
Can't getCustomer isLoggedIn magento2?
I try get custommer is login. it not success. this is my code
protected $_customerSession;
public function __construct(
...
\Magento\Customer\Model\Session $customerSession,
....
){
...
$this->...
2
votes
0
answers
172
views
Share session within different domains
I have one website, one store and multiple store views. One store view has different domain. I want this store view to have the same session, if product is added in one store view, should be also ...
2
votes
0
answers
138
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. ...
2
votes
0
answers
55
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 ...
2
votes
0
answers
491
views
Magento 2 Increase guest session time and keep the items in cart for 20 days
I want t increase guest user session time in magento. If guest user add to cart and just go for lunch or any other activity putting his/her website open in browser, when user come after 5-6 hours ...
2
votes
0
answers
360
views
Strange behavior with the redirects in Store views, Cms pages, Cookies
Config :
Front : I have Two store views 1:simple, 2:pro.
Admin : 1Website->1StoreGroup->2Storeviews: simple and pro
Cms Pages : I created different Cms pages, let's taking for example : 2 (A,B) ...
2
votes
0
answers
260
views
Magento 2: Session Information
Magento 2 has multiple session types. I know that each type gives you access to different information ie current customer information.
The sessions I know of are:
\Magento\Backend\Model\Session
\...
2
votes
1
answer
2k
views
Magento 2 - Cookies are not secure
I was wondering if there is a setting for creating secure cookies on M2. I have a vulnerability check and it shown that cookies don't have "secure" tags.
Or do I need to override a core function?
1
vote
0
answers
832
views
How is PHPSESSID cookie being set in Magento 2?
The only place I could find where the cookie actually not being initialized but renewed on every request is renewCookie() function in Magento\Framework\Session\SessionManager. Whenever there is a new ...
1
vote
0
answers
391
views
Problem with session of magento 2.4.5
whenever I activate the option 'Validate REMOTE_ADDR' it happens this error. I don't know what to do...
The "remote_addr" session value is invalid. Verify and try again.
and in admin, i'm ...
1
vote
0
answers
629
views
Redis connection errors (session handling)
I am using Redis cache for session storage in my Magento 2.4.3-p2 based store.
The app/etc/env.php setting looks like
'session' => [
'save' => 'redis',
'redis' => [
'host' =&...
1
vote
0
answers
394
views
Magento 2 Varnish caching add to cart session from another user
When adding an item to cart, it will also show a second item, which I have previously added to cart from a different device. If I bypass varnish cache, cart seems to work ok. Guess I am missing a ...
1
vote
0
answers
40
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?
1
vote
0
answers
191
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
0
answers
37
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
0
answers
103
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.
1
vote
1
answer
1k
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
0
answers
673
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 *
...
1
vote
1
answer
1k
views
Magento 2 Remove cart content when user log-out | Empty cart when logged back in
Correct me if I'm wrong, but completely removing the cart content on customer log-out is not native to Magento 2 is it?
I read about the "Persistent cart" but it seems to work only for removing the ...
1
vote
1
answer
318
views
how can we access customer session in checkout
I have one special field called some_id in customer data and I want to save the some_id and quote_id in database.
I am using sales_quote_save_afterevent to save both ids. But my customer session is ...
1
vote
1
answer
430
views
Magento2.2.5 : How to maintain a session value in product detail page to custom controller page?
I implemented some custom options in the product pdp page. i.e, i have to engrave the product in frontend(eg.pendant FRONT SIDE) as well as the backend(eg.pendant BACK SIDE) without refreshing the ...
1
vote
0
answers
91
views
Why reset the customer session data when FPC is enabled?
Regarding this article from @SohelRana what is the business or technical decision to empty the customer session data when FPC is enable?
1
vote
1
answer
2k
views
Uncaught Exception: Warning: SessionHandler::open(): Cannot call session save handler in a recursive manner
I move my magento project from localhost to shared server. Now since mod_version was not installed and the hosting provider said that enabling the module was not covered of the plan. So I followed the ...
1
vote
0
answers
494
views
Delete Session Files and Prevent Returning
I've already attempted to delete session files, but they come back one at a time and slowly... Huh? Can someone explain why please and help me permanently delete them please?
I can not locate them in ...
1
vote
0
answers
122
views
Global Page Success / Warning / Error Messages not showing in Admin
None of the global page messages are appearing on any page in the admin panel. This includes and is not limited to my own custom messages, saving a product, canceling an order and clearing the cache.
...
1
vote
0
answers
771
views
Magento2: How to set new session and clear session in login and logout
I want to add new session when user logged in also unset this session when user logged out.
When user logged in
set $this->customerSession->setRegisterEventId('1');
after user logged out
Unset ...
1
vote
1
answer
1k
views
delete session files older than one day, not working
I would like to clean session files older than one day.
I clean with cron with this
find /path/to/magento/var/session/ -mtime +1 -exec rm {} \;
and my cron setting is to run once a day, so
0 0 * * ...
1
vote
0
answers
576
views
Why SID is not coming in URL?
I am working on a multi-store configuration.
Store > Configuration > General > Web > Session Validation Settings > Use SID on Storefront is set to "Yes"
Store > Configuration > General > Web > Url ...
1
vote
0
answers
208
views
Magento 2 : How to Debug Which Extension is Causing Early Session Timeout or Logout of Admin
I have a problem in admin section where I frequently get logged out at random intervals of time.
One thing that I am assured is that one of my extension is causing trouble but I could not find way to ...
1
vote
1
answer
135
views
magento 2: session length recommendation
I was asked today to increase the php session length to 86400 (24 hrs) for one of our magento 2 sites. I am guessing this is to make guest's cart items be persistent for 1 day. I am used to session ...
1
vote
0
answers
56
views
How can I get Magento Each Session values by using Magento frontend cookie value through Web Service?
We are developing separate home page from Magento and accessing information from Magento through Web Services and will integrate this external home page with existing Magento website.
But on this ...
1
vote
1
answer
166
views
magento 2 logged in one browser , open another browser support session
Magento 2 logged in one browser , will open another browser account page support session how?
1
vote
0
answers
1k
views
choose session - Magento 2
I have referred this link for set session variable however I bit confused which one is adapt for my situation.
\Magento\Backend\Model\Session
\Magento\Catalog\Model\Session
\Magento\Checkout\Model\...
1
vote
0
answers
116
views
Error in M2 Checkout
I'm having a problem with product checkout in M2. When I want to place the order, a success page must be displayed, but I got redirected to the view cart page, and the item is still in the cart. I ...
0
votes
0
answers
28
views
The "remote_addr" session value is invalid
ON the backend Store>Configurations>General>Web we have set the "Session Validation Settings" which shows these options:
Validate REMOTE_ADDR: YES
Validate HTTP_VIA: YES
Validate ...
0
votes
0
answers
29
views
Magento 2.4.4p4 EE - GTM Session Regeneration on Every Page Load
I'm encountering a discrepancy between user/session activity and transaction count in Google Analytics (GA) for a Magento 2.4.4p4 Enterprise Edition project. The culprit seems to be frequent GTM ...
0
votes
0
answers
89
views
Add to Cart Not Working After Upgrade to 2.4.6.-p3
after upgrading to Magento version 2.4.6-p3 ,
Add to cart not working,
it just shows adding and then nothing happens.
also when I go from category page with options products , it does not shows any ...
0
votes
1
answer
549
views
Magento 2: LastRealOrderId is missing in checkoutSession
I am facing this weird issue on the checkout page. We are using 3rd party payment module, which redirects customer to the payment page after placing order in Magento. In the controller, it tries to ...
0
votes
1
answer
66
views
Magento User Session
It's displaying the maintenance image.
And it works fine in incognito or clear browser cache.
But how to say to all customers refresh their browser cache?
Cookie Lifetime is set 3600.
Is there any ...
0
votes
1
answer
123
views
Adding an XML array in the user session
I'm getting some data from an API. I want to save those data in my user session so that the API isn't called each time the page is reached.
First time: load API, save in session
After, load session
...
0
votes
0
answers
876
views
Magento 2 PHPSESSID Cookie Value is the same to different devices / browsers
I am running Magento 2.4.3 with Nginx, PHP-FPM, Varnish and Redis for session and caching storage. When I have already added a product to cart and then I add another product, visiting the site through ...
0
votes
0
answers
53
views
Overwriting Session Config To Add In 1 Week Of Keep Me Logged in Cookies Features
I am using Magento2.3.5-p2 installed on Ubuntu 20.04
I am required to implement a function in which at the login page when the user ticks on Remember Me checkbox, the system will store the cookies for ...
0
votes
0
answers
220
views
Magento 2 | i see a different customer name when i login
When I try to log in from the homepage of my site I see a name different from mine.
For example, instead of seeing the name John Doe I see the name Jackson appear which is not my name.
This problem is ...
0
votes
1
answer
193
views
Customer session model is not returning customer ID in class which was triggered by `customer_account_create` event
When using the customer_account_create event, the session model in my class is not able to return the customer ID using $this->customerSession->getId();.
However, for testing purposes, when ...
0
votes
1
answer
529
views
customer user name displayed on header bar when user logged out by session time automatically
I am building the magento 2.4 website
By the way I am facing with below customer login issue
"I had logged into the website with customer account
I spent some times and I visited the site by the ...