Skip to content

Setting area_code in CLI command #4

@jaminion

Description

@jaminion

Hey guys - sorry to bug you again. I've ended up getting this updated to the most recent dev-master, and it looks like the the area_code getting set in the constructor is still a problem. This is occurring in /Console/Command/ChangeCustomerPassword.php. While running other non-related CLI commands I can get the error "Area code is already set". The problem is some other CLI command setting the area code in the execute() method has a failure as it was already set in the constructor with this module.

This particular link discusses it in much better detail,

https://support.klevu.com/knowledgebase/resolving-area-code-already-set/

Moving that $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML); chunk down inside the execute() should completely resolve that problem.

Thanks again guys!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions