Closed ncla closed 2 years ago
Issue extracted from here: https://github.com/spatie/statamic-responsive-images/pull/149#issuecomment-1205745805
src values are saved as an array when there is no possible way for src to have multiple values with this addon.
src
While not exactly a show stopper, I think this inconsistency should be addressed.
Simply save a responsive field with an asset.
No response
-
Fresh statamic/statamic site via CLI
runtime (new)
The culprit seems to be with preProcess method in Assets fieldtype. While the core Assets fieldtype process method handles max_files being 1, the preProcess method does not and creates an array.
preProcess
Assets
process
max_files
1
https://github.com/spatie/statamic-responsive-images/blob/main/src/Fieldtypes/ResponsiveFieldtype.php#L140
Bug description
Issue extracted from here: https://github.com/spatie/statamic-responsive-images/pull/149#issuecomment-1205745805
src
values are saved as an array when there is no possible way forsrc
to have multiple values with this addon.While not exactly a show stopper, I think this inconsistency should be addressed.
How to reproduce
Simply save a responsive field with an asset.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
runtime (new)
Additional details
No response