0

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.
1

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>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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