Change from absolute URLs to relative URLs in image cache

Trent Newton shared this idea 1 month ago
In Progress

Hi, experienced a problem where I had a domain set as 301 redirect to a new domain, Koken kept adding to the image cache the redirected domain which returned a collection of 404 errors when users kept visiting the site.

Example:

https://newdomain.com/storage/cache/images/001/227/IMG-0041-copy,medium.crop.2x.1488871475.jpg to https://redirecteddomain.com/storage/cache/images/001/227/IMG-0041-copy,medium.crop.2x.1488871475.jpg (doesn't exist!)

Resolution:

Have the URLs stored like this instead: /storage/cache/images/001/227/IMG-0041-copy,medium.crop.2x.1488871475.jpg

Comments (3)

photo
1

This is also posted as a bug in the issue tracker, and we have posted a small "DIY solution" over at the KCS forum.

--

Best regard

Bjarne Varöystrand - Koken Community Support

photo
1

Thanks for the reply, that DIY solution is great but however I don't want to hack the core especially on client sites so I'm currently fixing the paths via a find and replace from a cron job.

photo
3

Trent, updated in Koken v0.22.21 released today. See: http://help.koken.me/customer/portal/articles/848339-release-notes

photo