3

I recently converted a Magento 1.9 module to be compatible with Magento 2. all was going well until I got this error:

Object DOMDocument should be created

I'm not experienced enough in Magento and PHP to figure out how to fix this so I linked the converted module below.

magento 1.9 module in question

I put the converted module here on github.

1

Remove var/generation,var/di and then recompile using below command.

sudo bin/magento setup:di:compile

and then check maybe it will help you

1

Recently during a module development I got the same kind of error. In my case I found out the real error which was:

Circular dependency: Vendor\Module\Helper\Data depends on Vendor\Module\Helper\Bot and vice versa.

I removed this dependency from the __construct method of my helpers (refactored them using one parent class) and error is gone. So I'll recommend you to check circular dependencies in your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.