Skip to content

Commit 309e020

Browse files
committed
ACP2E-73: The store with a pre-existing custom theme displays the message "The store will not work correctly in the case when cookies are disabled."
1 parent ab815b5 commit 309e020

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
67
/**
78
* @var Magento\Framework\View\Element\Template $block
89
*/
@@ -11,6 +12,11 @@
1112
<div class="cookie-status-message" id="cookie-status">
1213
<?= $block->escapeHtml(__('The store will not work correctly in the case when cookies are disabled.')); ?>
1314
</div>
15+
<?php
16+
$script = 'document.querySelector("#cookie-status").style.display = "none";';
17+
?>
18+
<?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false); ?>
19+
1420
<script type="text/x-magento-init">
1521
{
1622
"*": {

0 commit comments

Comments
 (0)