I would like to update the fix. It was a spelling mistake on the module name in the grid controller. My module name was HomeTry
, but i have updated the block class as Hometry. My local environment was based MAC and server is Linux, Its case sensitive. Care fully handle when naming and using it in the code.
Existing code
public function execute(){
$resultRaw = $this->resultRawFactory->create();
return $resultRaw->setContents(
$this->layoutFactory->create()->createBlock(
\Ayakil\Hometry\Block\Adminhtml\HTO\Tab\Products::class,
'hto.assignproducts'
)->toHtml()
);
}
Fixed code
public function execute(){
$resultRaw = $this->resultRawFactory->create();
return $resultRaw->setContents(
$this->layoutFactory->create()->createBlock(
\Ayakil\HomeTry\Block\Adminhtml\HTO\Tab\Products::class,
'hto.assignproducts'
)->toHtml()
);
}