Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
image system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Oct 2010 at 20:35 UTC
Updated:
29 Jul 2014 at 19:05 UTC
Jump to comment: Most recent file
Comments
Comment #1
hazaConfirmed on D7 HEAD
Seems the url generated for the image is something like
http://exemple.com/modules/image/sample.png%3F1286633141Shouldn't we have something like http://exemple.com/modules/image/sample.png?1286633141 here ? (the "?" is encoded)
Comment #2
hazaHere is a little patch that process the image path through url() function, correcting the issue
Comment #4
hazanon-applicable patch, maybe this one is better ?
Comment #5
swentel commentedWhile the patch fixes the issue, it's better to use file_create_url() instead of url() for creating links to files/images.
Comment #6
swentel commentedWhile we're at it, let's change time() to REQUEST_TIME too.
Comment #7
hazaYes, you're right.
Change the url() to file_create_url() and use REQUEST_TIME instead of time()
Comment #8
webchickAnd also while we're at it, we need some tests for this.
I think (hope) we already have tests for image styles, so this will just be an assertion that the image shows up on the page.
If that turns out to not be possible, then ok, but we should at least try it because this is a pretty nasty, obvious problem. Promoting to "Major".
Comment #9
swentel commentedAdded test, not sure if this is really the way togo, but it's something :)
Comment #10
ygerasimov commentedThe test doesn't catch this bug. I have tried to run the test without applying changes to image.admin.inc
Comment #11
swentel commentedHmm, it does here, not sure what might be wrong.
Comment #12
ygerasimov commentedwhat I have done is:
1. CVS checkout of HEAD
2. Cleaned patch. Leaved only changes to image.test file.
3. Applied patch and ran all the tests on image module
I didn't received any errors that is bad as I didn't fixed the original issue (didn't applied that patch).
Patch is working properly. Image gets displayed. What I think is it is not possible to write a test for this case. Or at least I have no idea how to test it.
Comment #13
moshe weitzman commentedI'm not sure how to do that test either. But lets fix the bug or get more input.
Comment #14
ygerasimov commentedIf the test is not valid please remove it from patch and lets get it committed.
Comment #15
dries commentedNeeds to wrap at 80 character boundary. Would also be nice to state why it should have that format.
Comment #16
webchickComment #17
hazaIt seems that the original issue was fixed in #563382: when editing image style, link to sample image broken (missing file_create_url()), or am I wrong. (at least, i'm not able to reproduce the bug with a fresh install)
Btw, we still need tests for that.
Comment #18
webchickOk, let's repurpose this issue.
Comment #19
Tor Arne Thune commentedComment #20
claudiu.cristeaDuplicate of #563382: when editing image style, link to sample image broken (missing file_create_url()) and was fixed, I cannot reproduce it anymore in D8.