Skip to content

Unable to clear Control Panel resources using ./craft clear-caches/all #3787

@romainpoirier

Description

@romainpoirier

Description

I'm trying to use the ./craft clear-caches/all CLI command.

Everything is working fine, except that I always get this error:

Error clearing cache Control Panel resources: Unable to clear Control Panel resources because the location isn't known for console commands.

My configuration returns these values:

  • Craft::$app->getConfig()->getGeneral()->resourceBasePath -> @webroot/cpresources
  • Craft::getAlias('@webroot') -> return correct value (using /htdocs as root folder)

I tried on another Craft 3.1 website, and got the same error. So perhaps it is a bug.

Steps to reproduce

  1. Use the ./craft clear-caches/all command

Additional info

  • Craft version: 3.1.8
  • PHP version: 7.1.8
  • Database driver & version: PostgreSQL 9.6.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions