Skip to content

[4.x]: UnknownMethodException error related to setNoCacheHeaders call after GenerateImageTransform #16793

@gilleard

Description

@gilleard

What happened?

Description

This change results in an UnknownMethodException being thrown when called on console requests.

We're specifically seeing it on 4.14.9, but seemingly would be the same on 5.x

Steps to reproduce

Call getUrl with a transform on an Asset that results in a generate-transform URL from a console context.

Expected behavior

Return the same value as prior to the change.

Actual behavior

UnknownMethodException thrown, breaking execution without manually catching.

Craft CMS version

4.14.9

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

n/a

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