Magento 2.2.0 Upgrade – Error Attribute Type is Not Allowed

attributesmagento2.2.0

I was able to upgrade a Magento store from 2.1.6 to 2.2.0. The backend
is working very good, but I am encountering an exception on the front
office.

The exception message says: Element 'block', attribute 'type': The
attribute 'type' is not allowed.

The whole situation is described in the next post from GitHub:
https://github.com/magento/magento2/issues/11839

I'm new in Magento. Could give me a link which describes from where
should I remove the invalid type attribute or other attributes or from
where can I refactor it?

Best Answer

Those lines are most likely ones in your layout XMLs:

Element 'block', attribute 'type': The attribute 'type' is not allowed.
Line: 776

Element 'block', attribute 'type': The attribute 'type' is not allowed.
Line: 783

Element 'block', attribute 'type': The attribute 'type' is not allowed.
Line: 816

Most likely in layout XMLs you have declarations like

<block type="..."

Which does not correspond to lib/internal/Magento/Framework/View/Layout/etc/elements.xsd and need to be replaced to

<block class="..."