Closed danielml01 closed 1 month ago
Found 1 error while validating the input provided for the GetObject operation: [Key] expected string length to be >= 1, but found string length of 0
That doesn't look like an error from Statamic. Are you using S3 (or similar)?
Also, what does your Antlers template look like?
Thank you for following up so quickly. We recently moved to using the eloquent driver for our assets meta. We're using a mysql database using statamic's native eloquent driver.
The relevant code that's breaking involves an asset relationship field called "thumbnail" `{{ if thumbnail }} {{ thumbnail }}
{{ /thumbnail }}
{{ else }}
<img src="/cover_images/1443109462_Screen-Shot-2015-09-24-at-11.43.50-AM.png" alt="REDACTED logo" height="462" width="834"/>
{{ /if }}`
Was this site ever on Statamic v2?
No it was not. We started in statamic 4
I don't really understand how you ended up with asset ids in your data rather than just paths. We've saved paths into asset fields since v3.
Like Jason mentioned, I'm not sure how you managed to end up with Asset IDs (eg. container::path
), instead of simply the path, since we haven't saved the IDs for a long time.
If possible, I'd recommend updating asset references to remove the container::
part since the fieldtype no longer supports it.
Bug description
in asset relationship fields, asset ids stored as container::filepath generate an error when called to display in antlers after updgrade to statamic 5 (they still work in the control panel) Temporarily can be fixed by going to the entry with the field and saving without changing anything. This changes the stored id from container::filepath to just filepath.
How to reproduce
create an entry that has an asset relationship field. Select an asset and save the entry. Edit yaml file for the entry and format the stored value to container::filepath (as it was previously) save yaml file in the antler, display any value from the related asset > this will generate an error in statamic 5
Logs
Environment
Installation
Starter Kit using via CLI
Additional details
No response