From b3d773ca28c541a6666fb4fe52d57edba47a3c94 Mon Sep 17 00:00:00 2001 From: Mohamed Abbas Date: Thu, 21 Nov 2024 18:17:47 +0530 Subject: [PATCH 1/3] Page heading null issue fixed --- .../Theme/view/frontend/templates/html/title.phtml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml index c4961448323fb..02960e74dd0f1 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml @@ -9,14 +9,18 @@ */ $cssClass = $block->getCssClass() ? ' ' . $block->getCssClass() : ''; $titleHtml = ''; -if (trim($block->getPageHeading())) { + +$pageHeading = $block->getPageHeading() ? trim($block->getPageHeading()) : ''; + +if ($pageHeading) { $titleHtml = 'getAddBaseAttribute() . '>' - . $block->escapeHtml($block->getPageHeading()) + . $block->escapeHtml($pageHeading) . ''; } ?> +

getPageHeading())) {

getChildHtml() ?>
- + \ No newline at end of file From b7a71e097c509b9e319a29b1153c3a2bfdcbb39b Mon Sep 17 00:00:00 2001 From: Mohamed Abbas Date: Thu, 30 Jan 2025 17:57:24 +0530 Subject: [PATCH 2/3] fixed copyrights --- .../Magento/Theme/view/frontend/templates/html/title.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml index 02960e74dd0f1..130d8c2a333fd 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml @@ -1,7 +1,7 @@ Date: Wed, 5 Mar 2025 19:20:51 +0530 Subject: [PATCH 3/3] Static test fixed --- .../view/frontend/templates/html/title.phtml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml index 130d8c2a333fd..58d40f0b2ecbd 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/title.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml @@ -3,7 +3,11 @@ * Copyright 2015 Adobe * All Rights Reserved. */ - +/** + * Escaper + * + * @var \Magento\Framework\Escaper + */ /** * @var $block \Magento\Theme\Block\Html\Title */ @@ -16,20 +20,20 @@ if ($pageHeading) { $titleHtml = 'getAddBaseAttribute() . '>' - . $block->escapeHtml($pageHeading) + . $escaper->escapeHtml($pageHeading) . ''; } ?> - -
+ +

getId()) : ?> id="escapeHtmlAttr($block->getId()) ?>" - getAddBaseAttributeAria()) : ?> - aria-labelledby="escapeHtmlAttr($block->getAddBaseAttributeAria()) ?>" + getId()): ?> id="escapeHtmlAttr($block->getId()) ?>" + getAddBaseAttributeAria()): ?> + aria-labelledby="escapeHtmlAttr($block->getAddBaseAttributeAria()) ?>" >

getChildHtml() ?>
- \ No newline at end of file +