yireo / Yireo_NextGenImages

44 stars 26 forks source link

Comparing the URL in getFilenameFromUrl() doesn't work, because normalizeUrl() changes https to http #63

Closed jeroen-dhm closed 4 months ago

jeroen-dhm commented 1 year ago

I just noticed an issue with one of your clients' stores using NextGenImages where the images didn't get replaced. Upon debugging I noticed that the getFilenameFromUrl() method in Yireo\NextGenImages\Util\UrlConvertor and the isLocal() method in the same class try to compare the URL with https to a URL without https.

This happens because of the call to normalizeUrl() on lines 64 and 132. The normalizeUrl() method replaces https to http, which invalidates the check.

The check results in an NotFoundException exception with the message "URL $url does not appear to be a local file" (line 135).

jissereitsma commented 1 year ago

Thanks for posting this. Indeed I'm noticing the same since the last release. A new version 0.3.19 is underway to fix this.

jissereitsma commented 1 year ago

Version 0.4.0 has now been released with a fix on board for this issue.

jissereitsma commented 4 months ago

I'm closing this ticket due to inactivity.