0

When I tried to change or open product I got next message:

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected.
Line: 1


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected.
Line: 1

Some of products have this error and I don't know where in XML I was wrong?

<?xml version="1.0"?>

    <move element="page.main.title" destination="product.info.main" before="-"/>

    <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
    <referenceBlock name="product.info.sku" remove="true" />
    <referenceBlock name="product.info.overview">
        <arguments>
            <argument name="at_label" translate="true" xsi:type="string">none</argument>
        </arguments>
    </referenceBlock>
    <referenceContainer name="product.info.media">
    </referenceContainer>


    <move element="product.info.stock.sku" destination="product.info.main" after="page.main.title"/>
    <container name="cart.wrapper" htmlTag="div" htmlClass="d-flex flex-column bg-smoke pl-5 py-4"/>
    <move element="cart.wrapper" destination="product.info.main" after="product.info.description"/>
    <move element="product.price.final" destination="cart.wrapper" before="product.info"/>
    <move element="product.info" destination="cart.wrapper" after="-"/>



    <block class="Magento\Framework\View\Element\Template" name="product.info.anchor" template="Hiddentechies_Bizkick::product/anchors.phtml"/>

    <move element="product.info.anchor" destination="content" after="product.info.media"/>



    <move element="content.aside" destination="content" after="product.info.anchor"/>

    <move element="product.info.details" destination="content" after="content.aside"/>

--> -->

    <move element="product.price.tier" destination="cart.wrapper" after="product.info" />


    <referenceContainer name="alert.urls" remove="true"/>
    <referenceContainer name="product.info.extrahint" remove="true"/>
    <referenceContainer name="product.info.review" remove="true"/>
</body>

1
  • check if all products that have this error share a type (e.g. configurable) or if they have layout updates entered via the admin panel May 13, 2019 at 16:14

1 Answer 1

0

Looks like this error related to your XML layout files, you have element , this will show the error, You you need to search ' element in admin in XML Layout update field in Category, CMS Page and etc.

As you are getting this is product detail page so you should look in product detail xml or it's admin section of layout updates.

Or there may be third party extension which have layout update related xml.

8
  • I don't know. I already google this, so I know that its can be trouble with XML file. But, as I said before, only some of products have that error. A saw the one strange thing - some of products duplicated on front view, but only one on my database. Mb it's trouble with db cache or similar.
    – Ashen One
    May 13, 2019 at 18:05
  • Can you please check how much cache used in app/etc/env.php file? if you are using varnish/rediss/mem cache then clear those cache.
    – Saphal Jha
    May 13, 2019 at 18:08
  • @Sahal Jha how can i check info about cache in env.php file? I open it, and here some additional, array-like info.
    – Ashen One
    May 13, 2019 at 18:40
  • just open and find one of this : varnish / rediss / mem
    – Saphal Jha
    May 13, 2019 at 18:45
  • sorry, but I don't have local version of project. Tomorrow I will check and write results. Thanks.
    – Ashen One
    May 13, 2019 at 18:54

Your Answer

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

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