Preview not working for images with CCK. Weird behaviour...
Hi,
I'm having problems with the image field module and CCK. I have a content type with an image field and a few text fields. Whenever I create a new node of this content type, everything seems to work fine, but the image won't be previewed until it's actually uploaded to the server.
By this I mean, I fill every text field, then browse the picture for the image field, and when I click on "update", I get the "delete" checkbox, in case I want to delete the pic, and the title and alt.text fields... but the box where the image should be previewed is empty.
If I click on "preview" anyway, the image doesn't show up either. It is when I actually click on "submit" when the image works fine. Once the pic is submitted, if I want to edit this node, I can see the picture preview without a problem.
Another problem that I noticed is that when i want to delete the picture by checking the "delete" checkbox, nothing seems to happen, but the picture is actually deleted. Once again, until you don't hit "submit", you get a strange behaviour.
Can anybody help me solve this issue?
Thank you so much in advance.
Jose Carlos.

I think this might be an
I think this might be an issue with your .htaccess file in the /files folder. Look in the readme for imagefield and you will see something about changing the .htaccess file so you can see previews.
http://chibabeat.com/
Thank you..
Thanks for your reply. I read the README file, and after trying out what's said in it, I still can't get it to work.
This is the bit of the README file that talks about previews:
To make previews work you should update the .htaccess file in you files
directory.
comment out RewriteEngine off
add +FollowSymlinks to the Options stanza.
This is what my .htaccess file looks like in the files directory:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options +FollowSymlinks
RewriteEngine off
Still it's not working. Am I doing anything wrong?
Thank you so much for your attention.
Jose Carlos.
Did you figure out your
Did you figure out your problem?
I am struggling with similar behavior on 5.0. I have been trying to get around this problem for more than a week without any success.
Appreciate any help.
What is the problem you are
What is the problem you are having?
http://chibabeat.com/
If you like my advice then please link to me! Believe me! I need the links!
Solution for me
Drupal 5.1 (new user)
After a hair pulling day I seem to have found a fix. In my case I solved this odd problem by removing a leading forward slash I included in the optional subdirectory path setting of the image field. The template warns not to use trailing slashes but doesn’t mention anything about leading slashes…
Bad= /u2
Good= u2
Administer -> Content Management -> Content Types -> (your content type) Edit -> Manage Fields -> (image field) Configure -> Image Path -> (enter path to image directory from "sites/(your site name)/files" directory. Do not use leading or trailing slashes).
HTH,
Doug
headache.
Any other suggestions. I'm also getting weird behavior with imagecache and imagefield in drupal 5.1. No preview (grey line or red X in IE) but the image will upload when only "submit" is clicked. ??? To make matters more confusing, preview and submit is working fine in Firefox, but not in IE6, and only sometimes in IE7. (I swear.)
I first thought it was a problem with PHP on my host, (because they are running an older version, 4.4) but image previews are working fine on another drupal install on the same server.
Then worked with permissions, until the files, imagecache, tmp folders, and every subdirectory are 0777.
Then tried adding and deleting different .htaccess files.
I've removed all non-essential modules that may have somehow conflict, and have also removed the html for most of the $styles stylesheets and $scripts scripts, which might effect the page. (in other words I'm out of ideas.)
Hide in preview?
As a temporary solution, how do you hide the imagefield from node preview? It's not very attractive or reassuring to see missing images in the preview so why not at least make it look clean?