0

what is the replacement for below code within xml

htmlClass

I am getting this error :

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

this is the offending code:

  <referenceContainer name="product.info.media" htmlClass="ticket-media product media">
        <block class="Magento\Framework\View\Element\Template" name="eventticketimage" template="Magenest_Ticket::catalog/product/images.phtml"/>
    </referenceContainer>

and also this:

   <referenceBlock name="page.main.title" htmlClass="ticket-page-title
page-title" remove="true"/>
1
  • <referenceBlock name="page.main.title" remove="true" /> Sep 13, 2019 at 10:24

2 Answers 2

4

remove htmlClass="ticket-page-title form below code

 <referenceBlock name="page.main.title" htmlClass="ticket-page-title
page-title" remove="true"/>

as htmlClass not allowed in block or referenceBlock .

0

There are only two allowed attributes for reference blocks

#1 remove

#2 display

Where the container has the following attributes

#1 htmlClass

#2 htmlId

#3 htmlTag

#4 output

#5 as

#6 after

#7 before

#8 label

#9 name

hence the htmlClass is not applicable for referenceBlock

DovDocs for reference click here

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.