magento-cache-clean icon indicating copy to clipboard operation
magento-cache-clean copied to clipboard

Clean Cache On Theme Directory Rename

Open sprankhub opened this issue 5 years ago • 2 comments

I have a theme under src/Namespace/Themename. ./src/*/* is defined as a local composer repository. When I rename the directory src/Namespace/Themename/Magento_Catalog to src/Namespace/Themename/Magento_Catalog2 (to quickly check if my customisations broke something), the cache is not cleared. I guess it makes sense to clear it in this case as well?

sprankhub avatar Mar 12 '20 08:03 sprankhub

Thanks for opening the issue!

Currently I don't think the watcher registeres renaming of theme directories, only files within that directory, but I will check. In the meanwhile, maybe there is a similarly easy way to temporarily disable a theme, e.g. by renaming the registration.php file or such? Just a thought.

Vinai avatar Mar 13 '20 10:03 Vinai

Thanks! Not sure what happens when the theme is configured, but not present anymore. I would expect an error. Anyway, this is also helpful during refactoring.

If you check that, it may make sense to check if renaming of extension directories is currently detected.

sprankhub avatar Mar 13 '20 12:03 sprankhub