statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Assets field type: Can't add a second image after adding the first one #2395

Closed jeffwhitfield closed 5 years ago

jeffwhitfield commented 5 years ago

My client noticed an odd bug with the assets field type. I don't know if it has anything to do with it but the field is within a Replicator fieldset.

Basically, for an assets field that is within a Replicator field, if you add an image and then go back to add another image the second image doesn't get added. Here's a video that demonstrates the issue (much easier and quicker than screenshots!):

https://www.dropbox.com/s/vczud1xi6ffpe72/statamic-assets-bug-demo.mp4?dl=0

Environment details:

Additional context I did remove the Image add-on referenced above to make sure it's not causing any issues. Behavior is still the same.

jackmcdade commented 5 years ago

@jeffwhitfield, thanks for the super detailed report! It's kind of funny, because what you demonstrated as a bug is actually how it's intended to be used. If you have an asset field with max_files: 2, you can select up to two images and save that. When you deselected the first, you did just that. Removed it. You're just supposed to highlight two, and voila. Done.

If you want to go through two separate action flows of picking one asset each, you can use two separate asset fields set to max_items: 1. Does that make sense?

I'm going to close this as it's not a bug, and chalk it up to different expectations. Feel free to reply with thoughts!