contact us page title and meta description changes not reflating in magento2
-
14-04-2021 - |
Вопрос
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Contact us </title>
<meta name="description" content="Drop Down Your Query for the Promt Replies at info@abc.in and for Customer Care Support we have a Contact Number, Contact Us at 0000000000. Chat Support also Available. Track Orders." />
<meta name="keywords" content=""/>
</head>
<body>
<referenceContainer name="content">
<block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml">
<container name="form.additional.info" label="Form Additional Info"/>
</block>
</referenceContainer>
</body>
</page>
Решение
Please run the below commands
php bin/magento setup:upgrade
php bin/magento setup:di:compile
rm -rf var/view_preprocessed/* var/page_cache/* -rf var/cache/*
chmod -R 777 Root path/*
If you change your code in XML you need to run setup:upgrade
Try this
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" layout="1column">
<head>
<title>Contact Us</title>
</head>
<body>
<referenceBlock name="page.main.title" remove="true" />
<referenceContainer name="content">
//Your Block
</referenceContainer>
</body>
</page>
Не связан с magento.stackexchange