Closed (fixed)
Project:
Image
Version:
6.x-1.0-beta3
Component:
image_attach
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2009 at 14:15 UTC
Updated:
29 Dec 2009 at 20:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedDid you clear your cache?
Does you image_attach table still have data?
Can you look at the devel output for a node that should have an attached image -- does it have a $node->iid value?
Comment #2
bcobin commentedI have the same or similar problem after upgrading to 6.14 - in my case, the teaser thumbnail image is OK, but in the body I just get an empty
<div class="all-attached-images"></div>tag.In beta3, the thumbnail image linked to the image (yikes!) - dev version links to the node, which makes it usable.
I'm attaching a screen capture of the image_attach table and below is the Dev output of a node with an attached image. Again, the teaser tag is fine, the body has an empty div.
This is a pretty major problem - the client is missing all the pictures on their nodes! Marking this as critical. Any ideas would be very, very helpful... thanks!
Comment #3
joachim commentedOk so your node is 151.
The DB says it should have 134 attached.
$node->iids has 134 in it, so the data has made it in.
However, the image_attach has an empty DIV.
So it looks like the new theming function I committed is broken :( -- that should take the iids and create the image_attach HTML.
I am currently too busy to look at this in detail, so any debugging work you can do, or even a patch, would be appreciated.
And thanks for supplying the data -- made it very quick for me to figure this one out :)
Comment #4
bcobin commentedThanks for getting back. Unfortunately, I'm not a coder, so debugging is beyond my skill set. And to make things more puzzling, Image Attach seems to work fine on my sandbox, but not on the production site, which makes me think it might be permissions-related, even thought I've set all the existing images and the files/images path to 777.
Glad I was (hopefully) able to narrow down the issue; perhaps this will give someone else some ideas. In the meantime, I am standing by... thanks!
Comment #5
joachim commentedIt's not file permissions:
The gap is in turning the iids into HTML that points to the files, but nothing happens with physical files up to this point, it's all only data.
However -- what do you see at node 134?
Comment #6
bcobin commentedI see the image file at what I assume is the original size.
Comment #7
joachim commentedTry clearing your theme cache -- the new theming function needs to get picked up and I think I changed the names.
Comment #8
bcobin commentedNo change...
Comment #9
joachim commentedI think the access check might be new:
Are your images publically visible or are they, say, unpublished?
Hmm, though in that case, I should see them as admin.
We need to test what theme_image_attach_block_attached is getting -- does it get an array of $image_nodes?
Comment #10
bcobin commentedYeah - the full node image appears in Garland, so it's theme-related after all. Everything was fine in 6.13 - can I roll back to an earlier version of Image without deinstalling and having the client lose all their attached images?
I haven't a clue as to what's happening here and now I have a site that's not fully functional - major drag.
Any ideas here would be greatly appreciated... thanks!
Comment #11
joachim commentedDo you mean the attaching node or the image node?
I reckon the image node is fine in any theme.
And you probably can't roll back if you didn't take a backup.
I'm afraid I'm really busy so can't spend any more time on this; plus there's a patch in the queue to replace all this theme code, so this is old code we're debugging. Furthermore, it really looks like it's your site that's doing something wacky. I'd suggest you get a Drupal programmer to spend some time on it.
Comment #12
bcobin commentedIt's the attaching node that has the problem - I'd also assume the image is OK.
Thanks for looking into this; I have to wait for off hours to take the site offline and investigate this further - I will do so and report back.
As to "wacky," things were perfectly fine (including validation) until the latest upgrades; admittedly, ATCK (which is what I'm using) does unset a lot of Drupal stuff, so perhaps therein is where the problem lies... I will investigate... thanks!
Comment #13
danigrrl commentedI'm having the same issue - when I upgraded, the notification said that they couldn't edit something with _fid (don't remember the name), and then all my images disappeared. Checked the permissions, tried upgrading again, and nothing has brought them back.
Comment #14
danigrrl commentedI just tried Garland and two other default themes and the images are still not appearing; I'm using 960 as my base theme. Nothing was wrong until I upgraded to the new version of this module. I'm going to try reverting back to beta2 to see if my images come back - the client's site is basically broken now because of this.
Comment #15
danigrrl commentedI'll also mention that I had my old copy of the module still on my harddrive, and after re-uploading the old version and running update.php, the images now show up again. So, apparently, there's an issue with the upgrade.
Comment #16
bcobin commentedFound it! (in my case, anyway.) For me, it was a conflict with the beta1 of Feed API.
I rolled back to beta2 of the Image module and disabled Feed API (and accompanying modules); the images appeared. I then upgraded to beta2 of Feed API (which was released today) and my views with the attached images had a broken handler with the following message:
Error: handler for image_attach > iid doesn't exist!
I then deleted the broken field and replaced it - attached images seem OK now.
Very, very nasty - I lost a few days on this one - hope it saves somebody some time as you all have saved me many times over!
Comment #17
joachim commented@bcobin: Maybe if you read the release notes? http://drupal.org/node/575958
And anyway, your problem is to do with views, so not the same as the issue here. Please don't cloud things.
@danigrrl: This sounds familiar. Could you post exact error message you get?
Comment #18
joachim commented@danigrrl: is it your image nodes or just your attaching nodes that have the problem? If the former, was it due to this perhaps: #583076: Error on Database Updates for 6100 when upgrading to Beta3: 'duplicate entry' for primary key
Comment #19
bcobin commentedI believe I've tracked down the problem, at least in my case. I will open this post as a separate thread insofar as there seem to be several potential issues here and the problem that I found is very specific:
Bug: Incorrect path for attached images with Image 6.x-1.0-beta3 / D6.14 when Drupal running in subdirectory
Summary: When running in a subdirectory, subdirectory path for the site is incorrectly prepended to the proper attached image path. Thus, images fail to display.
Example:
Dev site base URL is "http://xxx.xx.xx.xx:8888/" - working directory in this case would be "http://xxx.xx.xx.xx:8888/[sitename]".
Correct path for attached thumbnail image should be:
"http://xx.xxx.xx.xx:8888/[sitename]/sites/default/files/images/[image].t..."
Instead, generated path is:
"/[sitename]/http://xx.xxx.xx.xx:8888/[sitename]/sites/default/files/images/[image].t..."
Obviously, this is really wrong. Evidently, this only happens when the site is running in a subdirectory; on a production site that's installed relative to the base URL, the problem doesn't appear to arise, which has made tracking this down (obvious as it is) even more of a head-scratcher.
Changes to the .htaccess file, clearing caches, theme registry, etc. have no effect.
Comment #20
joachim commentedI think the original issue here was resolved.