Skip to content

Fix CDN path invalidation for replaced assets with the same filename#196

Merged
angrybrad merged 3 commits into
craftcms:2.xfrom
white-mark-w:Cloudfront-invalidation-file-path-fix
Jun 10, 2026
Merged

Fix CDN path invalidation for replaced assets with the same filename#196
angrybrad merged 3 commits into
craftcms:2.xfrom
white-mark-w:Cloudfront-invalidation-file-path-fix

Conversation

@white-mark-w

Copy link
Copy Markdown
Contributor

Description

This pull request makes a targeted fix to the CDN invalidation logic when replacing an asset with another asset that has the same filename. The update ensures that the correct path is invalidated in the CDN.

CDN invalidation fix:

  • Updated the logic to construct the correct oldPath by including the folder path when invalidating the CDN path for replaced assets with the same filename. This ensures the original file's CDN path is properly invalidated.

Related issues

#195

@angrybrad angrybrad merged commit f21a397 into craftcms:2.x Jun 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants