When I upgraded my webiste from M2.3.5 to M2.4.2, I get this notice "The store will not work correctly in the case when cookies are disabled." on top of head for 3 seconds. But I installed a new M2.4.2 have not get that notice(Cookie Restriction Mode = No) . I found div id named "cookie status" but I can't find which file can control this. I don't need the notice display, so how to do that? Thanks
After install a new magento 2.4.2, I never get notice about that with same settings.
I am facing same issue after upgrading the Magento version 2.4.2-p1 to 2.4.3
How I can disable this notification from frontend?
I am also facing the same issue. I have migrated from 2.4.2 to 2.4.3. I also have the notification turned off in the admin area. Stores/Settings/Configuration/Web/Default Cookie Settings = No
q
If you are facing this issue just on new version, I will recommend you to go back to the old version. You can get all the updated plugins to make your old version just like as new. Once I also faced the same issue and someone recommend me this solution. Magento latest version is 2.4 and I am still using 2.3 with all latest updates.
The cause is the missing code in Magento_Theme::js/cookie_status.phtml
<?php $script = 'document.querySelector("#cookie-status").style.display = "none";'; ?> <?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false); ?>
We chose not to add this code as it causes delay and potentially Cumulative Layout Shift (CLS). Our solution is to use CSS to hide the element:
#cookie-status { display: none; }
You can also remove the block entirely from the head by adding the following to
app/code/<vendor name>/Theme/layout/default_head_blocks.xml
<body> <referenceContainer name="after.body.start"> <referenceBlock name="cookie-status-check" remove="true"/> </referenceContainer> </body>
This solution may present a problem when the element's data is required if the user has not enabled cookies.
Nice one, this should be the accepted answer
I have the similar issue when updated to 2.4.3.
@jhond1762ge4b7Why are you spamming?
This is not the correct answer, for those unsure.
This is not correct answer, for those unsure.