Closed (won't fix)
Project:
Imagefield Crop
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Jan 2008 at 19:06 UTC
Updated:
21 May 2010 at 00:21 UTC
Issue is:
(summarised from http://drupal.org/node/212576)
After you crop an existing image, the image you see in your browser is a cached version of the image. You need to press 'Refresh' on your browser to refresh to the cropped image.
It *would* be the cleanest solution to rename the file if this was an independent module. However, this is just a widget on top of imagecache field, and as far as imagefield is concerned, this is the same file, so no necessary updates are not being made on the node.
Comments
Comment #1
bones commentedMy solution, although it may not be 'correct' is to change the filename and update the files data base table changing line 179 onwards to:
Comment #2
yhager commentedDoes this work for you? I am a bit reluctant with changing the DB directly under the legs of other modules. It might also break with other aspects of the file management (like deleting the old file) should be handled by this module, or if the file handling code of imagefield might change. IMHO, this is the job of other modules.
Let's leave this as a patch here for the moment for whoever wants this functionality, until I gather the right way to implement this. Can you post this in a patch format against the CVS code (http://drupal.org/patch/create)
Comment #3
yhager commentedComment #4
simeJust create a timestamp and add it to the end of the image url eg:
This will be seen by the browser as a unique file.
Arguably you don't want to do this on the public image, and you don't need to most of the time since all the editing is done when the file is created.
Comment #5
yhager commented@sime: thanks for the idea. I'll try that and post here the results.
Comment #6
yhager commentedThe problem with the suggestion from #4 above is that the imagefield_crop is not consulted upon node_view, so we have no control over what is being displayed..
Comment #7
queenielow commentedThanks for the solution..
I works fine for me..
Thanks alot Bones!
Comment #8
yhager commentedThis is fixed in the 6.x version, if imagefield is patched with http://drupal.org/node/353405#comment-1224788
Comment #9
yhager commentedThe fix cannot be ported to 5.x, so this is actually a wontfix for 5.x.
Comment #10
johnpitcairn commentedI'm having trouble with this, as per #17 in http://drupal.org/node/353405#comment-1224788, using ImageCache for all non-editing image display:
Imagefield 6.x-3.3
Imagecache 6.x-2.0-beta10
Imagefield Crop 6.x-1.0-rc1
I'm using an "Image" content type, which when viewed as a node just displays the image via an Imagecache preset. Other nodes may nodereference this Image node - these grab the filepath from the nodereference, and display that via an ImageCache theme call (different Imagecache preset).
I'm seeing the timestamp for the image displayed by the widget update on the Image node *edit* page, and the imagefield timestamp in the node is updated, so it appears that's working correctly.
But I'm not seeing any timestamp reflected in the Imagecache filename output on Image node view. So the browser doesn't think the file has changed. Should the Imagecache filename output include the timestamp?
And does/should Imagefield Crop conditionally flush the Imagecache filepath, as per #1?
(I'm also expecting further trouble when I re-enable the Revisioning module, as that will create an unpublished revision and the re-crop should not be public until the revision is published. But that's a separate issue.)
Comment #11
johnpitcairn commentedSee also: http://drupal.org/node/689470#comment-2993962