Skip to content
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

Webapi module cannot be disabled #1759

Closed
tzyganu opened this issue Aug 28, 2015 · 2 comments
Closed

Webapi module cannot be disabled #1759

tzyganu opened this issue Aug 28, 2015 · 2 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@tzyganu
Copy link
Contributor

tzyganu commented Aug 28, 2015

The Magento_Webapi cannot be disabled even if the installer UI allows it.

Steps to reproduce:

  • Install a new instance of Magento 2 using the web installer
  • In the step4, "Customize your store", in the "Advanced Modules Configurations " section, I disable the Magento_Webapi module
  • Proceed with the installation

Expected result

  • Magento 2 installs without the Magento_Webapi module

Actual result

  • Installer stops at 69% with and error message

    Cannot instantiate interface Magento\Framework\Cache\FrontendInterface in
    lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php

Additional info:

After digging in the code I found out the problem appears when trying to instaintiate \Magento\Customer\Model\Attribute.
The constructor (inherited from \Magento\Eav\Model\Entity\Attribute) expect and instance of Magento\Framework\Reflection\DataObjectProcessor that expects in its own constructor and instance of Magento\Framework\Reflection\MethodsMap that expects in the constructor and instance of \Magento\Framework\Cache\FrontendInterface called $cache.
There is no preference for \Magento\Framework\Cache\FrontendInterface declared anywhere (maybe because different implementations of this interface are used for different classes)
but the di.xml of the Magento_Webapi contains this:

     <type name="Magento\Framework\Reflection\MethodsMap">
        <arguments>
            <argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Webapi</argument>
        </arguments>
    </type>

This makes the customer module depend on the webapi module and this dependency is not declared anywhere.

@vpelipenko vpelipenko added the PS label Aug 31, 2015
@mazhalai
Copy link
Contributor

@tzyganu Thank you for your report. We are tracking this fix in ticket MAGETWO-42234.

@mazhalai mazhalai added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Aug 31, 2015
@piotrekkaminski
Copy link
Contributor

This is fixed, should be available soon.

magento-team pushed a commit that referenced this issue Nov 24, 2017
Fixed issues:
- MAGETWO-75217: SKU parameter in capital letters on CSV ignored by database in Import but OK'd by validator
- MAGETWO-77840: [2.2.x] - Special/lowest price in child of a Configurable Product causes the entire product to show that price
- MAGETWO-70725: Admin token does not expire after 'Admin Token Lifetime (hours)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

4 participants