craftcms / aws-s3

Amazon S3 volume type for Craft CMS.
https://plugins.craftcms.com/aws-s3
MIT License
61 stars 28 forks source link

Volumes can be created with invalid cache control settings #177

Open nternetinspired opened 5 months ago

nternetinspired commented 5 months ago

Description

When creating a volume it is possible to select a cache duration expiresPeriod with the dropdown, without entering any value, which causes image uploads and image transforms to fail.

User error? Yes, but I'd expect it to not be possible to save the dropdown duration expiresPeriod, to project.yaml, without an associated expiresAmount value.

Steps to reproduce

  1. Create an asset volume, type S3, completing required fields.
  2. Select a cache duration (e.g. seconds).
  3. Save.

Existing assets in the volume can be indexed, but Craft cannot create the transforms for control panel thumbnails and new uploads fail with the error message 'Unknown or bad format ( seconds) at position 0 (s): The timezone could not be found in the database'.

Additional info