-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fatal error: Cannot instantiate interface #2502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@bvboas can you please give more details about your environment, and how to reproduce this error? Navigate to front end or backend after installation? |
OS: MAC OS X 10.9 I don't have any third-party extension enabled. I just have to visit any page, frontend or backend, for the error to show. |
@mazhalai The .htaccess directive
is commented. So I assume is in 'default' Switched to developer and production, but the error persists. |
@bvboas can you check apache or php logs to see if there is any stack trace? |
You might check the di.xml file to see if you added a comment and failed to close it correctly, or something silly like that to cause the <preference...> element to be omitted. The fact that it worked and now does not, leads me to the suspicion "you accidentally broke it". I am trying to think of how you could have done this - an XML comment is one way the preference was not loaded. |
@alankent You were right. I've just switched to phpStorm, and since there are no warnings about saving changes, for some reason <preference for="Magento\Framework\View\Design\Theme\ResolverInterface" type="Magento\Theme\Model\Theme\Resolver" /> became <preference for="Magento\Framework\View\Design\Theme\ResolverIdeveloperMaterializationnterface" type="Magento\Theme\Model\Theme\Resolver" /> Sorry about this. |
@bvboas thank you for your update. Closing this issue. Please feel free to open a new one in case of any issues. |
"You were right." SCORE!!! Ahem. Glad to be of help. |
i dont understand, how you resolve this problem, can you please explain it again, because i have the same error and search for a solution my last 5 hours |
@rexha5minds it was an issue with the di.xml file. Make sure you haven't made any changes. |
I have had this issue as well, having the deploy mode set to |
As @alankent says "Check your di.xml" I didn't realise you need to add it as a preference if you instantiate it. Documentation |
[Team 3] Sprint 7 Delivery
My magento store is throwing this error:
I don't know why it started to appear. I made no new module installation. The store was working fine.
I've check file permissions and I see no issue there. Also deleted /var/ dir and folders/files where created.
The preference is defined vendor/magento/magento2-base/app/etc/di.xml
The text was updated successfully, but these errors were encountered: