-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets can not be resolved on SSP (symlinked assets folder) #362
Comments
Answer is in thephpleague/flysystem#599 (comment); We just need a |
ok, after much debugging, we found the bug is in PublicAssetAdapter::getPublicURL() It uses realpath($this->getPathPrefix), which may not be within BASE_PATH once resolved from a symlink. The fix is to store a logicalPathPrefix when we construct the adapter, and compare this to base_path (without realpath). Also, instead of falling back to returning null, we can assume $dir === ASSET_DIR instead. :D |
Updated fix at silverstripe/silverstripe-framework#6565 |
In a site hosted on SSP, none of the assets will load.
Uploading a new image shows the preview, then when you navigate away and back again it is gone.
The network browser tells me that the thumbnails it tries to load are just my root domain, no filename included. I don't see
assets/
as a prefix to the filenames that are returned in the GraphQL, just for exampleUploads/filename.jpg
I can replicate this locally by changing my assets directory to a symlink. Note: the underlying league/flysystem package does not support symlinks.
The text was updated successfully, but these errors were encountered: