2

Getting this error. Please can anyone help us ?

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value 'Ortho\Theme\Block\category\Leftcategory' is not accepted by the pattern '[A-Z][a-zA-Z\d](\[A-Z][a-zA-Z\d])*'. Line: 798

Element 'block', attribute 'class': 'Ortho\Theme\Block\category\Leftcategory' is not a valid value of the atomic type 'blockClassType'. Line: 798

5 Answers 5

0

Seems that this is happening because of the block class path, where the 'category' folder is written with lower case. Try to change it to 'Category'.

1
  • Maybe but i just can not figure it out where i should change. Any idea?
    – user38833
    Commented Oct 25, 2017 at 10:16
0

Please share the full error stack.

This error discussed here: https://github.com/magento/magento2/issues/11110

My take away is that the validation is effective in M 2.2, not prior. One issue mentioned in that post is that Leading slashes in class references in Templates. E.g. /myspecialclass.../../ is not allowed, shile myspecialclass.../../ is allowed.

1
  • This can be, but i can not figure it out where and in which file i should changed. Please can you tel me where exactly i have to be
    – user38833
    Commented Oct 25, 2017 at 10:15
0

In my case, there I used Magefan of blog extension in view page error.

It's resolved by below changes.

<block class="\Magento\Framework\View\Element\Text\ListText" name="blog.post.bottom">

I has changed it to:

<block class="Magento\Framework\View\Element\Text\ListText" name="blog.post.bottom">
0

One of your Module's Block class probably named Ortho\Theme\Block\Category\Leftcategory

Try to search all your layout.xml files in your app/code or app/design for this string and change it according to the actual class namespace

(as Nicolas mentioned, it's probably should be Ortho\Theme\Block\Category\Leftcategory with a capital C)

0

You need to change the file name local.xml.sample to local.xml in folder pub/errors

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.