4

I wish to remove the attribute element in the catalog_product_view.xml file

I have tried below

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

<body>
<attribute name="itemtype" remove="true"/>
<attribute name="itemscope" remove="true"/>
</body>
</page>

But throws error.

When I added remove='true' to these attributes - I got the following error:

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'attribute', attribute 'remove': The attribute 'remove' is not allowed.
0

1 Answer 1

8

I have solved the problem by following link https://github.com/outeredge/magento-structured-data-module/commit/41ea6ca81a2d8499b954498bce09b7be9d80dc2a

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

<body>
<attribute name="itemtype" value=""/>
<attribute name="itemscope" value=""/>
</body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.