Old img_assist tags support a "thumb" attribute to display as a thumbnail. For example:
[img_assist|fid=24|thumb=1]
The new version of img_assist doesn't support this feature. In fact, all the references to _img_assist_get_thumbnail() have been removed from the module. Now the images that used to display as thumbnails are shown full-size.
This may be a duplicate of this bug, but it's so unclear I decided to post a new one.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | img_assist_7.patch | 2.98 KB | darren oh |
| #1 | img_assist.patch_0.txt | 2.92 KB | MrEricSir |
Comments
Comment #1
MrEricSir commentedHere's a patch.
Old style [img_assist] tags that use thumb=1 now display the thumbnail again.
Comment #2
darren ohLet's think about how to update 4.6 sites instead of adding a redundant attribute.
Comment #3
darren ohComment #4
darren ohOK, since the Img_assist already has a well-organized legacy section, I worked up a patch for the latest version. Please see if it works.
Comment #5
darren ohComment #6
smallfluffykat commentedIs this patch OK? I've just spent the day upgrading my site from 4.6.6 to 4.7.4 and am reluctant to start to fiddle with patch files I don't understand after feeling like running an upgrade marathon ;-) If noone else chimes in I'll of course give it a try but I need to understand how to patch first. Many thanks for your hard work.
Comment #7
darren ohI'd appreciate it if you would test the patch. I don't have a site to upgrade, so can't guarantee it works, but it shouldn't hurt anything. Instructions for using patches are in the handbook.
Comment #8
smallfluffykat commentedI believe that I got the patch to apply correctly using the help link you gave but there does not seem to have been a change in behaviour. Images that were previsouly thumbs are still showing full size. I applied the patch to the .module file with the header
$Id: img_assist.module,v 1.56.2.16 2006/12/01 16:56:00 darrenoh Exp $. Is there something that I can tell you to help diagnose the problem? Cheers. Kat.EDIT: On second throughts it appears not to have properly patched. I would guess that the --- means remove line while +++ means add line so the file version header in the patched file should change? It hasn't even though the supposedly patched file has changed it's last modified time to this morning. Confused...
Sorry for being a patch idiot. I will try to work out what's happening.
Comment #9
smallfluffykat commentedFurther to the previous post I have noticed that the full size versions of the image only show for user number 1. Images show correctly in the image galleries to it appears to be caused by img_assist. Looked at issue http://drupal.org/node/79470 but I'm unsure whether the code mentioned in note #2 is valid. Have (hopefully) updated this issue to 'critical' as at the moment there seems to be no fix and my site is very broken. Am surprised that there is not more mention of this problem on the forums but my searches have brought up nothing. If I've missed something please point me in the right direction. Cheers, Kat.
Comment #10
smallfluffykat commentedOK I have received my first error message on this
user warning: Duplicate entry '379-0' for key 1 query: INSERT INTO img_assist_map (nid, iid) VALUES(379, 0) in myfilepath/includes/database.mysql.inc on line 121. I'm not sure what it means yet but the odd thing is that the post which I have been using as the 'fiddle with this post by editing' is now displaying the full size image to a non-admin user. The other images spread all over the site still no longer display.Comment #11
darren ohComment #12
smallfluffykat commentedI believe that I can now confirm that this patch does not work. I was experiencing additional problems with img_assist that were masking the effectiveness or not of this patch. I have hopefully now resolved these. I have downgraded the issue back to normal as the reason I upgraded it was unrelated to the problem described in this issue. Although the site is not pretty without thumbs, it does work. Feel free to upgrade it back to critical if you feel that it is required.
Comment #13
sunSorry guys, this issue is in the queue for too long.
A database migration script might be a more comprehensive way to upgrade old contents. Bear in mind, that fid also changed to nid, so I guess the whole tag would have to be altered.
If someone comes up with something like this, feel free to re-open this issue.