Skip to content

Volumes can be created with invalid cache control settings #177

Description

@nternetinspired

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

  • Craft version: 4.9.1
  • PHP version: 8.3.6
  • Database driver & version: MySql 8.0.36
  • Plugins & versions: aws-s3 2.2.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions