cancel
Showing results for 
Search instead for 
Did you mean: 

Object DOMDocument should be created error while doing argument replacement

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Object DOMDocument should be created error while doing argument replacement

a:4:{i:0;s:37:"Object DOMDocument should be created.";i:1;s:5742:"#0 D:\xampp\htdocs\magento_ce2\vendor\magento\framework\View\Element\UiComponent\Config\Reader.php(95): Magento\Framework\View\Element\UiComponent\Config\DomMerger->getDom()
#1 D:\xampp\htdocs\magento_ce2\vendor\magento\module-ui\Model\Manager.php(261): Magento\Framework\View\Element\UiComponent\Config\Reader->read()
#2 D:\xampp\htdocs\magento_ce2\vendor\magento\module-ui\Model\Manager.php(169): Magento\Ui\Model\Manager->prepare('world')
#3 D:\xampp\htdocs\magento_ce2\vendor\magento\framework\View\Element\UiComponentFactory.php(139): Magento\Ui\Model\Manager->prepareData('world')
#4 D:\xampp\htdocs\magento_ce2\vendor\magento\framework\View\Layout\Generator\UiComponent.php(125):

...... ...

Getting this error while trying to do argument replacement from di.xml

 

My Block file code,

 

 namespace Smart\Black\Block;

class World extends \Magento\Framework\View\Element\Template
{
    protected $_process;
    
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Smart\Black\Model\Process $process,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->_process = $process;
    }

}

 

My di.xml code,

 <type name="Smart\Black\Block\World">
        <arguments>
            <argument name="process" xsi:type="string">Smart\Black\Model\Process2</argument>
        </arguments>
    </type>

 

Could you please help here?