Skip to content

M2.4 alternative to reference in design layout

I just upgraded from M2.3.5 to M2.4.4 and on some product pages I am getting the following error in developer mode:

Exception #0 (MagentoFrameworkConfigDomValidationException): Element ‘reference’: This element is not expected.

This error was not happening with M2.3.5 or M2.3.7p3.

After spending hours searching the net, and disabling all my custom xml files it turns out it was being caused by Design Layout Updates I was using since M1.7.

What is the correct way to add cms blocks after the add to cart button but before the product description button on a product description page using design layout updates in M2.4.4?

Below is a sample code that is causing the issue.

block_name