cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.3 Invalid block type: Magento\Backend\Block\Order\Create\Form

Magento 2.4.3 Invalid block type: Magento\Backend\Block\Order\Create\Form

I upgraded the Magento Version 2.4.3, in the Admin Sales-Create New Order, I am getting the error of:

2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\Backend\Block\Order\Create\Form
Exception #1 (ReflectionException): Class Magento\Backend\Block\Order\Create\Form does not exist

But when I search this block in my App-Code, I don't have any block used with this name, anywhere in my custom modules.

I have only used the Order\Create\Form in one of my custom module in di.xml.


di.xml code

<type name="Magento\Sales\Block\Adminhtml\Order\Create\Form\Account">
    <plugin name="after_order_create_comment" type="Custom\Module\Plugin\Sales\Block\Adminhtml\Order\Create\GallerySchool" sortOrder="10"/>
</type>

And calling in Custom\Module\Plugin\Sales\Block\Adminhtml\Order\Create\GallerySchool


GallerySchool.php

<?php namespace SFC\School\Plugin\Sales\Block\Adminhtml\Order\Create;

class GallerySchool
{
    public function afterToHtml(\Magento\Sales\Block\Adminhtml\Order\Create\Form\Account $subject, $html)
    {
        $newBlockHtml = $subject->getLayout()->createBlock('\Magento\Framework\View\Element\Template')->setTemplate('SFC_School::gallerylist.phtml')->toHtml();

        return $html.$newBlockHtml;
    }
}


But After removing both codes, still the issue remains the same. There is nothing in DB also with this block name. The same code is working fine with the Magento lower versions


Anyone, please help me to fix this issue. Thanks in Advance!