Unsaved nodes: images no longer appear in preview on upgrade to 2.6

bobdalob - March 18, 2009 - 13:05
Project:ImageField
Version:5.x-2.6
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

cck: 1.10
imagefield: 2.6
imagecache: 2.3
permissions: 777 files, 775 tmp
download method: public

imagefield config:
content type with multiple values (max 3)
display - preset 'thumb as link to node' in teaser and a preset resized version of original in full nodes
contemplate 2.04 to display images

pre-upgrade: 5.x-2.3 (patched per http://drupal.org/node/372041#comment-1249444).
what should happen: everything working ok - upload image, displays in preview (teaser and full nodes, per contemplate), then all fine in saved nodes.

upgrade: direct to 2.6
what happens: images no longer appear in preview (new and unsaved nodes) but will appear when saved and then viewed or edited.

tried: revert to v2.3, whilst also restoring database to pre-upgrade state, everything okay again.
tried: upgrade to 2.4, everything okay.
tried: upgrade 2.4 to 2.6, same problem again.

update log for 2.4 to 2.6:
Update #4 - No queries
Update #5 - UPDATE {content_field_image} SET field_image_fid = 0 WHERE field_image_fid NOT IN (SELECT fid FROM {files})

what am I missing?

#1

quicksketch - March 18, 2009 - 19:07
Status:active» duplicate

Thanks for the extensive report, could you update the existing issue #130701: Cannot see the image in Preview with your findings? A copy/paste is great.

#2

quicksketch - March 18, 2009 - 19:09
Status:duplicate» active

Never mind, let's instead close that issue since it's got all kinds of other cruft in it. Let's start over here.

#3

kamleshpatidar - March 19, 2009 - 12:44

Hi quicksketch,

I have setup my Website on Localhost & on server. I am using

Drupal 5.12
Apache 2.0.63
php5.x

& i have one custome content type, that i use for image upload.
i am using imagefield latest(Release on 16 March 2009 ) & Imagecache Latest.

When i upload a image, thumbnail is displaying on Localhost, but with same setting thumbnail doesn't display on server(Hosting site). If i trying to upload a image smaller than 2kb, then thumbnail display on server, but i upload a image larger than 2 kb i am able to get a dark Grey line instead of thumbnail of that image. May be it's not a issue relating to your module,but help me to get rid out of this problem. is there any problem in php.ini setting? or something else.

Best,
Kamlesh

#4

Bacteria Man - March 31, 2009 - 19:40

I'm experiencing the same problem with 5.x-2.6 where the ImageField preview is not displaying the image. The only time it works correctly is when the image file extension is in all upper case (exp. image.JPG). I'm pretty certain the problem is with the Apache web server configuration and not ImageField. Clean URLs are enabled and we're using the default .htaccess file included in the latest Drupal 5.x distribution.

#5

kamleshpatidar - April 3, 2009 - 06:14

Hi Bacteria Man,

Thank you for such a helpful comment. I know it that everything is happen just not because of Imagefield module.

The only time it works correctly is when the image file extension is in all upper case (exp. image.JPG).

i fully agree with you. Clean URLs are enabled. I am able to see thumbnail during upload on my Local. But unable to see on live site. i checked both .htaccess file, surprisingly they are same, not even a single dot has been changed. i am totally confused from where this problem has been generated. guide me, what can i do?

Best,

Kamlesh

#6

Bacteria Man - April 3, 2009 - 08:14

Hi Kamlesh,

Thanks for sharing your findings.

I'm still looking for an answer.

I should clarify my last post. Even though the client-side preview does not work the image is in fact correctly uploaded upon submission.

I'm fairly certain the problem is not exclusive to ImageField because it doesn't occur on every server. I can only conclude the problem is Apache and/or PHP related, but I have run out of places to look.

Thanks,
John

#7

kumar654 - April 7, 2009 - 16:08

hi kamlesh, i have the same problem that you are facing. I am able to upload and preview thumbnail on WAMP server but not able to do it on my remote site.

I am using

drupal 5.16
cck 5.x-1.10
imagefield - 5.x-2.6

I have installed and activated the imagefield module. The imagefiled not working, when i try to upload the image- a thing Grey line shows up in the preview thumbnail area.
I read almost all the issues related to imagefield but was't able to solve this problem.

Any possible solutions

#8

kumar654 - April 7, 2009 - 16:19

i have clean urn emabled and i also tried by making the tmp directory. i dont understand, it is working perfectly on my wamp server but not on the remote website.

i think the problem is with php or apache

please, anyone has a solution commot on it

#9

Bacteria Man - April 7, 2009 - 20:04

Hi Aditya,

Do me a favor and look at your status page (Drupal 6: admin/reports/status, Drupal 5: admin/logs/status) and tell me if "GD library" shows up in the list.

What's weird is that on my dev box ImageField preview works as expected and on the status page "GD library" is listed. However on the client's staging server (running virtually the same versions of Apache, PHP and GD library) ImageField preview does not work and "GD library" is missing from the list.

It's a complete longshot and most likely has nothing to do with the problem, but I'm grasping at straws at this point.

Thanks,
John

#10

kumar654 - April 7, 2009 - 21:59

Hey Bacteria Man,

Thanks for looking in to the matter. Fortunately I figured out what the problem is.

all you have to do is go to - this is for drupal 5

Step 1
administer/file systen - and then just remove the "/" in front of tmp. what this will do is that it will create a tmp directory in your drupal folder.

Step 2
go to the CCK type (page or story) and then click on manage fields for imagefield. Over there make sure that the imagepath is left blank

Step 3
That's it. it should be up and running.

I tried it on two of my live websites that were not uploading images and both of them worked

See if this works for you. is there a better solution

#11

kumar654 - April 7, 2009 - 22:02

Bacteria man,

Also use image cache 1.7 instead of the latest one. it does not create any gallery automatically.

i used imagecache 1.7 with image field and it workd perfects

thanks
kumar

#12

Bacteria Man - April 8, 2009 - 03:01

Hey kumar654,

I was excited to read you had found an answer, but unfortunately your solution didn't work for me. I didn't have a leading backslash on my tmp directory path and leaving the imagepath empty didn't make a difference. Oh well, my search for an answer continues.

Oh, I'm also using ImageCache 1.7. It works just fine and I like the small footprint compared to the the 2.x version.

Cheers,
John

#13

spangaroo - April 14, 2009 - 04:28

Hi all,

For me it seems to be an Apache issue. I've already been in touch with my hosting provider and they helped change the permissions to my account for this directory:

http://www.mywebsite.com/drupal1/sites/default/files/imagecache

But the next time that I added a new preset it automatically changed permissions back to Apache, I'm not allowed to create any files or directories under the /imagecache directory

So no images are being created in sites/default/files/imagecache

But I was able to access a the large Drupal head sample image in sites/default/files/imagecache_sample.png so not sure how it got dumped in there.

I just followed up w/ a support request and we're still trying to figure out the best way to proceed.

My wild guess is that it's because I originally installed Drupal via Fantastico? Maybe that would make each Drupal-generated directory owned by Apache.

Will try and update if anything positive comes of it because I really like the functionality imagecache has to offer.

cheers,

spence

P.S. I'm on Drupal 6.10

#14

quicksketch - April 14, 2009 - 05:06

Maybe that would make each Drupal-generated directory owned by Apache.

No matter how Drupal was installed, Drupal (and all other PHP scripts) will always save the files as the Apache user. There's usually not a problem with this, since if Drupal is managing your files, why do you need to be FTPing to change them? This is especially true of the imagecache directory, it's entirely managed by Drupal and there's no reason why you should be manually placing files in there, especially since editing an ImageCache preset will delete all the files within the directory (that's the "cache" part of ImageCache).

spangaroo, Also I'm not sure why this request was filed here. The "preview" referenced in this issue refers to the image preview when editing a node. It doesn't have anything to do with ImageCache.

#15

spangaroo - April 14, 2009 - 05:43

Thanks for the clarification and sorry for posting in the wrong area.

#16

elud000 - June 10, 2009 - 21:23

I had the same problem.
I had two imagefields in the same content type:
One worked perfectly, the other did not show the uploaded image neither in preview or after saving the content type.
.
When I tried the same in Internet Explorer I did *not* have this problem.

This is the actual html generated for the two image fields in full node view:
The first image did *not* show in Firefox, the second show normally:

Poster: 

Image: 

Also note that the code generated is quite different for some reason>

 
 

Drupal is a registered trademark of Dries Buytaert.