Thought i'd document a peculiar behavior using Drupal 5.7.

Images don't show up in the node when i use version 5.x-2.1 but they show up fine when I use 5.x-1.2-rc1.

I am using ImageField on a basic picture+body content type. I switched back and forth between the two versions and it appears that only the RC1 version displays the image in my node and 2.1 does not display the photo at all. I can preview the image in the node/edit but it does not display when i use 2.1.

I thought it was a file size limitation, but i even tried it with really small files.
I thought it was because of spaces in file names but it is not the case.

Comments

roleychiu’s picture

PS: my host is using PHP 4.3.9 perhaps the 2.1 version requires php 5+ ?

fossle’s picture

I am having the same problem and I am using php5+. I've tried all the suggestions in the Imagefield posts and nothing seems to work. I can get the title to display, but the not the image.

lias’s picture

I'm also experiencing this problem, updated from 5x1rc1 to 5x2.1 and now my imagefield photos aren't displaying. I've also installed imagecache 2 and imagefield gallery and dependencies. Nothing shows up in the logs.

edited:
Okay, figured out you need to go to the content type where you have the imagefield and select display fields tab. There you need to make sure the correct display is enabled and then resubmit. Now my images are displaying again.

bbeyer’s picture

What should the 'correct display' be?

lias’s picture

In my case I had set up a imagecache preset called "teaser" and so I had to select that for my imagefield display and then hit submit to save my changes.

marcp’s picture

I had the same issue without imagecache installed.

Comment #3 above tipped me off to go check what was set on the "Display fields" tab for the image field. Teaser and Full were set to Default. I switched them both to "link to image" and saved the settings and now my images are appearing.

To reproduce this, and I haven't done this exactly, I'd start with a brand new Drupal installation, ie:

1. Clean 5.7 install
2. Latest CCK
3. Imagefield 5.x-2.1
4. Create a simple content type that has only 1 additional field -- an imagefield, but do not visit the "Display fields" tab
5. Create a node with an imagefield attached
6. See if the image appears
7. If the image didn't appear, go to admin/content/types/YOUR-CONTENT-TYPE/display, select "link to image" for both teaser and full, and save the settings
8. See if the image appears now on the node you created in step 5

I haven't got time to debug this now, but hopefully these steps will save someone else some time and/or allow someone else to confirm that this is the issue.

bonobo’s picture

I have also replicated this on a vanilla 5.7 install as described by marcp -- In doing some cursory trouble shooting, it appeared that setting the display to anything other than "default" caused the image to display correctly.

kriskd’s picture

Thanks for the tip. I changed mine from "Default" to "Link to Node" and the image appeared. However, I really don't want any link on the image. It's just an image that goes with the content type. That appears to be my best option though. Does anyone have any comments or suggestions?

On other sites I've used the Image module with Image Assist and that seems to provide the results I want plus the flexibility to put as many images and anywhere I want within the node. I'm trying to get away from the Image mod though is it is or will be deprecated I've heard and images as nodes just doesn't make a whole lot of sense in my opinion.

accessiveapps’s picture

What for me also nicely worked is to set a folder in the files directory... first I wanted to have the pics in there but now I upload them in a seperate folder inside the files dir and it works...

mariuss’s picture

Priority: Normal » Critical

Same issue here, even in Drupal 5.8.

marcp's steps and workaround did the trick. Still, not perfect since what I want is just the image, with no links around it.

It seems that the "Default" display option is broken.

mariuss’s picture

An interesting observation. There are a couple of sites from a multi site install that are not affected by this, not sure why. The interesting thing about these two sites is the fact that there is only one image formatter available, just "Default". Is this formatter info cached somehow? Cleared the cache, made no difference.

Double checked that these sites also use Imagefield 5.x.2.1, really puzzled why I cannot see the full list of formatters. Whatever the reason it seems that this is why images are still displayed on these sites.

mariuss’s picture

Partially figured it out. It is a caching issue.

Proper workaround:
- set the display option for the image that refuses to show up to "link to node"
- check to see if the image shows up now, it will have a link around it
- now go back and change the display option for the same image back to "Default"
- check again to see if image still loading, should load fine with no link

I guess the following would also work:
- under "Manage fields" click on "configure" for that image
- save image settings, without making any changes
- image should load fine now

If you are using the CCK Blocks module you have to make the same kind of changes in the image block configuration (switch to "link to node" and then back to "Default).

If you have image cache installed then the number of formatting options is much larger, but you can apply the same workaround. I noticed that in this case, with image cache enabled, the formatting option got reset to the first available one, pretty bad.

A proper fix would require some code in the .install file, in an update function, to clear the appropriate cache. Also, it would need to pick the proper formatter when image cache is used.

kriskd’s picture

Proper workaround:
- set the display option for the image that refuses to show up to "link to node"
- check to see if the image shows up now, it will have a link around it
- now go back and change the display option for the same image back to "Default"
- check again to see if image still loading, should load fine with no link

Thanks, that fixed it for me!

faqing’s picture

The problem is the file name. If you use only English a-z and numbers, there will be no problem.

mariuss’s picture

File names I am using are all ASCII, so you may be dealing with another issue.

dopry’s picture

Title: Images don't display » Images don't display after upgrade to ImageField 2.1...
Status: Active » Closed (fixed)

when you update to the newest version of imagefield you have to goto admin/content/types/{mytype}/display and reconfigure the formatters... You must submit this for when you've set all the select boxes appropriately.

mariuss’s picture

Status: Closed (fixed) » Active

We figured this the hard way.

This is not documented anywhere as far as I can tell, so this is still an open issue.

Can you add an UPGRADE.txt file that explains this?

Even better, since the previous version of this module had only one formatter, could you write an update function that properly updates the formatters and there is no need to reconfigure them through the UI?

liquidcms’s picture

as far as i can tell there are lots of things busted with this release.. :(

- images don't show (as described here)
- default image doesn't work (although maybe now it does since i fixed this issue)
- resizing doesn't work (my field is defined as max res = 400 but i still get full size)

bonobo’s picture

@liquidcms, re "lots of things busted" --

You'll need to be more precise with your issue reports, as we have been using this release on several sites with no issues.

Have you cleared your browser cache and flushed your imagecaches?

Also, more info on your theme/additional modules installed/php and server info could also be relevant.

liquidcms’s picture

I think i have it all working now.. this is what i needed:

- still using latest imagefield 2.1

- imagecache (i grabbed 5.x-2.x-dev)
- imageapi (latest)

Is it supposed to be obvious that these are required?? they arent listed as dependencies with the imagefield module

I enabled imageapi for GD. Enabled imagecahce.

Created 2 presets.

Manually added files/imagefield_default_images as per another post here to fix issue with default images.

When into display setup for field and set teaser/body to my 2 presets (although it now knew at least to use one of those presets for both teaser/body as opposed to default which seems to be busted).

Everything seems to be working now.. :).. but would have to suggest there are more than a few bugs here.

liquidcms’s picture

sorry bonobo, i should be more specific.. maybe about my credentials as well.. lol.. i have designed dozens of drupal sites and contributed many modules and patches... i just threw up first comment as a quick post to let others know that i was also having issues with this release.. i usually do follow these up with more info or a patch (as i did above as soon as i figured a few things out).

alextronic’s picture

YES, thx much!
Wow what a fight with this.

Leeteq’s picture

emdalton’s picture

Proper workaround:
- set the display option for the image that refuses to show up to "link to node"
- check to see if the image shows up now, it will have a link around it
- now go back and change the display option for the same image back to "Default"
- check again to see if image still loading, should load fine with no link

This worked for me

I guess the following would also work:
- under "Manage fields" click on "configure" for that image
- save image settings, without making any changes
- image should load fine now

This did not work.

Sure looks like a bug to me. You shouldn't have to set the parameters to a setting you don't want, and back again, to get the images to continue to display.

TravieMo9’s picture

I tried this module with Drupal 5.10. It would not work even with the suggested work around of playing with the Display Fields. I did not want ImageCache so I did not install it, as it wasn't listed as dependency. I went back to 1.2 rc1 and it works fine. I have pulled my hair out with this. Sometimes it worked on my test site on Localhost, but not on my live site.

smk-ka’s picture

There are now patches for at least two identified issues:
1. #258747: Fix imagefield 1.x -> 2.x upgrade path. Rename default formatters from $name to $name .'_default'.
2. #318058: Image not displayed

After applying you need to run update.php. Testers welcome.

zet’s picture

My issue seems to be diferent from all those described here. Something else seems to be the problem because no solution described here is working for me.

I have a "multisites" enables on drupal. All of them are displaying imagefield images corectlly.

Only one seems to be problematic:
I have upgraded to imagefiled 5.x-2.1 and imagefiled images aren't displaying.
So I disable imagecahe try "default ", I try "link to node" , I try imagecache presets and "lightbox" presets, get back to default, disable and uninstall imagefiled module too , reenable it, -> nothing seems to work.

Images are uploaded, displayed on the edit page, but not on the normal display page. Imagecahe does not create any derivated image .

For the other sites from the multisite environement, one of the options described above,
(- change display option for the image that refuses to show up
or
- "Manage fields" , "configure" and "save")
has solved the problem, but not for one site.

What can I do ?

Thanks and Sorry for my bad english

edited after : in my dev load i have :

field_poza

Array
(
[0] => Array
(
[fid] => 40
[title] =>
[alt] =>
[nid] => 71
[filename] => Tudor Stefanie.jpg
[filepath] => files/danielbuda.ro/Tudor Stefanie.jpg
[filemime] => image/jpeg
[filesize] => 8911
)

)

but picture don't show up for any display option

last edit :

f...ing TWILIGHT theme . Do not use that if you don't want to bang your head to the walls asking what the hell is the problem with images not displaying . I changed the theme and it looks all right for now. I Hope I have not messed up something else in the mean time trying all sort of versions of imagefiled and changes in the database

sun’s picture