Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Saved S3 assets not persisting when editing entry in CP (2.5.8+) #1406
Previously selected/saved S3 asset(s)1 should appear in asset field when going back to edit an entry in the CP.
Previously selected/saved S3 asset(s) do not persist within the asset field when reopening an entry where they were saved. UI assumes the field is empty and deletes the key:value on CP save.
Note: A rollback to 2.5.7 alleviates the issue.
Steps to reproduce
Operating System: macOS Sierra2
Web Server:: Apache 2.4
PHP Version: 7.1.4
Statamic Version: Confirmed on 2.5.8 & 2.5.9
Updated from an older Statamic or fresh install: update from 2.5.7
List of installed addons:
1. Doesn't appear to affect assets stored in a local container.
Sure. I'll put together a more detailed example later with some screen caps , but here's the fullest explanation of the problem I can give at the moment:
I have a collection with multiple single-asset fields pointing to an S3 asset container. An author goes in and adds an entry with new assets, saves, and the
However, on certain versions of Statamic (basically anything after 2.5.11), if a user opens one of those entries in the CP, those asset fields are completely blank. The values are stored correctly in the
No errors are reported to logs, and there are no errors in the console or Vue developer tools. I'm stumped.
The issue first showed up for me in 2.5.8. Based on the history of this issue, it appears you fixed it in a May release (2.5.10?), but then it reappeared in 2.5.12 and above.
Months later, a potentially facepalm-worthy update:
After taking a break from maintaining the site in question, today I took a look at how the Asset field was saving data to each entry's MD file. At some point, it seems Statamic's preferred format for S3 URLs changed from
Not sure if I missed something in release notes along the way.