You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically as the title says. I have never understood the red message when clearing caches until I saw #7286 in the changelog.
I use the public directory instead of web, so I added the following to my general config:
'aliases' => [
'webroot' => 'public/',
]
Unrelated: Isn't the public directory supposed to automatically be detected in my scenario?
If your web root is something besides web/, public/, public_html/, or html/, or it’s not located alongside your craft executable, you will also need to override the @webroot alias, so it can be defined properly for console commands. (docs)
After executing ./craft clear-caches/all I noticed the red message was gone! But when I went to commit the change I noticed the public/cpresources/.gitignore was now also being deleted.
Even after going to /admin to regenerate the cpresources it does not recreate the .gitignore file.
Additional info
Craft version: 3.5.17.1
PHP version: 7.4.13
Database driver & version: MySQL 5.7
Plugins & versions: -
The text was updated successfully, but these errors were encountered:
Wiejeben
changed the title
Clearing all caches after defining webroot => 'public/' alias removes gitignore in cpuresources
Clearing caches after defining webroot => 'public/' alias removes gitignore in cpuresources
Jan 7, 2021
Thanks for pointing that out! From the looks of it, maybe #2823 was never really resolved in the first place. Not sure why I couldn’t reproduce it at the time, but was able to now, and just fixed for the next release.
I use the public directory instead of web, so I added the following to my general config:
'aliases' => [
'webroot' => 'public/',
]
You might run into issues setting the @webroot alias to just 'public/'. Better to go with an absolute path:
Wiejeben
changed the title
Clearing caches after defining webroot => 'public/' alias removes gitignore in cpuresources
Clearing caches after defining webroot => 'public/' alias removes gitignore in cpresources
Jan 12, 2021
Description
Basically as the title says. I have never understood the red message when clearing caches until I saw #7286 in the changelog.
I use the public directory instead of web, so I added the following to my general config:
Unrelated: Isn't the public directory supposed to automatically be detected in my scenario?
After executing
./craft clear-caches/all
I noticed the red message was gone! But when I went to commit the change I noticed thepublic/cpresources/.gitignore
was now also being deleted.Even after going to /admin to regenerate the cpresources it does not recreate the .gitignore file.
Additional info
The text was updated successfully, but these errors were encountered: