Skip to content

[InvalidArgumentException] Cache frontend 'default' is not recognized. #8285

Open
@konstanchuk

Description

@konstanchuk

Preconditions

Using Magento 2.1.3 with sample data and PHP 7.0.8

Steps to reproduce

Create a new module and add a plugin for Magento\Framework\App\Request\Http in [module_root]/etc/di.xml
For example:

<type name="Magento\Framework\App\Request\Http">
    <plugin name="not_working_http_request_plugin"
        type="Company\CustomModule\Plugin\Http"
        sortOrder="70"
        disabled="false"/>
</type>

do not forget to create a file Company\CustomModule\Plugin\Http

Flush cache using php bin/magento cache:flush

Run php bin/magento setup:di:compile.

Result

2017-01-25 23-34-47

If you remove the plugin code from [module_root]/etc/di.xml and run the command php bin/magento setup:di:compile, you will receive this error again. The command php bin/magento cache:flush began to return an error There are no commands defined in the "cache" namespace.

If clearing the cache using , rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/* I can again use php bin/magento setup:di:compile

But if the return plugin code in file, the problem Cache frontend 'default' is not recognized. persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Install & AdministerComponent: SetupIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.bug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions