I am tring to call block from the controller action but its not working and throwing me an error as

Exception #0 (OutOfBoundsException): No element found with ID 'left'.



Can you please tell me how can i achieve above things?

  • From which controller, Its backend controller?
    – Sohel Rana
    Jul 14, 2016 at 6:44
  • Yes, Its a backend controller. Jul 14, 2016 at 11:17

1 Answer 1


First of all, you should not add blocks from the controller. Use the layout file for that.
But if you do, you need to call $this->_view->loadLayout() prior to adding your blocks.
and make sure your layout file has the main tag looking like this:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

layout="admin-2columns-left" ensures you that the left column exists.

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.