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 (MagentoFrameworkExceptionLocalizedException): Invalid block type: MagentoBackendBlockOrderCreateForm
Exception #1 (ReflectionException): Class MagentoBackendBlockOrderCreateForm 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 OrderCreateForm in one of my custom module in di.xml
di.xml code
<type name="MagentoSalesBlockAdminhtmlOrderCreateFormAccount">
<plugin name="after_order_create_comment" type="CustomModulePluginSalesBlockAdminhtmlOrderCreateGallerySchool" sortOrder="10"/>
</type>
And calling in CustomModulePluginSalesBlockAdminhtmlOrderCreateGallerySchool
GallerySchool.php
<?php namespace SFCSchoolPluginSalesBlockAdminhtmlOrderCreate;
class GallerySchool
{
public function afterToHtml(MagentoSalesBlockAdminhtmlOrderCreateFormAccount $subject, $html)
{
$newBlockHtml = $subject->getLayout()->createBlock('MagentoFrameworkViewElementTemplate')->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!