Skip to content

Commit 4ce9949

Browse files
committed
AC-15674: Varnish 7.3 (latest version)- Sub Categories links / options of Default category are not getting displayed on Store front Home page
Fix for integration and static test failure
1 parent 835af11 commit 4ce9949

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

app/code/Magento/Theme/view/frontend/layout/default.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2013 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

dev/tests/integration/testsuite/Magento/PageCache/Model/Layout/MergeTest.php

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\PageCache\Model\Layout;
77

@@ -29,10 +29,20 @@ public function testLoadEntitySpecificHandleWithEsiBlock()
2929

3030
/** @var EntitySpecificHandlesList $entitySpecificHandleList */
3131
$entitySpecificHandleList = $objectManager->get(EntitySpecificHandlesList::class);
32-
// Add 'default' handle, which has declarations of blocks with ttl, to the list of entity specific handles.
33-
// This allows to simulate a situation, when block with ttl attribute
34-
// is declared e.g. in 'catalog_product_view_id_1' handle
35-
$entitySpecificHandleList->addHandle('default');
36-
$layoutMerge->load(['default']);
32+
33+
// Register test layout file with ttl attribute
34+
$testHandle = 'test_layout_with_ttl';
35+
36+
// Add this handle to entity-specific list to trigger validation
37+
$entitySpecificHandleList->addHandle($testHandle);
38+
39+
// Manually add the layout XML from test fixture
40+
$layoutXml = file_get_contents(__DIR__ . '/../../_files/test_layout_with_ttl.xml');
41+
$layoutMerge->addUpdate($layoutXml);
42+
43+
// This throws exception when loading
44+
// because test_layout_with_ttl is marked as entity-specific
45+
// and contains a block with ttl
46+
$layoutMerge->load([$testHandle]);
3747
}
3848
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9+
<body>
10+
<block class="Magento\Framework\View\Element\Template" name="test.block.with.ttl" template="Magento_Theme::html/notices.phtml" ttl="3600"/>
11+
</body>
12+
</page>

0 commit comments

Comments
 (0)