Images don't get uploaded

Crell - January 26, 2007 - 20:56
Project:ImageField
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I just upgraded a 4.7 site from imagefield 4.7.0-1.0 to 4.7.x-dev in order to get more recent bug fixes that haven't been tagged to stable yet. Unfortunately, that also broke the module completely. :-) When I try to add an image to a field, I always get a message that the field is required (correct). The problem is that I am providing a file. It's just not "taking", regardless of whether I hit Submit or Upload.

Stepping through the code with a debugger, it looks like imagefield_field() is getting called with op "validate" twice, but never with a data-saving op.

#1

hadsie - January 31, 2007 - 21:43

I think I'm having the same problem. It looks as though the images are getting uploaded into the tmp folder but never moved to their proper location.

#2

krunar - February 2, 2007 - 14:30

same problem here...worked for a while..now its dead

#3

DamienMcKenna - February 4, 2007 - 03:09
Version:4.7.x-1.x-dev» 5.x-1.x-dev

Drupal 5.1, cck 5.x-1.3, imagefield v5.x-1.x, imagecache 5.x-1.x-dev

I'm seeing the same problem with the above.

#4

DamienMcKenna - February 4, 2007 - 04:16

OK, I updated CCK, imagecache and imagefield to the latest CVS code. Images upload a-ok and if I set the the "display fields" it works great. Yehaw.

Now to get imagecache to work right..

#5

dopry - February 5, 2007 - 11:06
Status:active» active (needs more info)

@Crell, Its my dev branch. It isn't always sane. You should wait for a release.

@hadsle, are you still having issues, can you please provide details about you environment and step to reproduce the bug you are experiencing if it is still an issue?

@krunar, If it worked, what did you change that made it stop working. Functioning code doesn't just decide to do something else out of the blue. normally there is some other issue at play in those instances. either way you comment provides absolutely no information I can use to help you or trouble shoot the issue you are experiencing.

@DamienMcKenna, that display fields tab is awesome :) thank eaton.

#6

havran - February 5, 2007 - 19:40

I use latest Drupal 5.1 with CCK (5.x-1.3) and latest imagefield (imagefield 5.x-1.x-dev from January 25, 2007 - 14:05).
I have existing node with my content type (named guest). I want expand this node type with imagefield. I set my imagefield max image size to 220x280 pixels. I have tried upload image larger than max image size and save node - image was uploaded OK and node saved and show with image. If i tried upload image sized exactly 220x280 pixels i have image uploaded (previewed) OK but after save node i have no image in my existing node.

#7

havran - February 5, 2007 - 20:33
Status:active (needs more info)» active

I have tried same configuration (modules and Drupal versions same as previous post) on my second Drupal 5.1 instalation. In my first installation i use MySQL 4.1 database on second i use PostgreSQL 8.2 database. I have tried replicate error on my second instalation - imagefield seems working correct (after i have correct this bug http://drupal.org/node/116211).

#8

etimbo - February 7, 2007 - 03:59

I can confirm this bug seems to occur when you upload an image to the same dimensions as the max resolution size.

#9

havran - February 7, 2007 - 09:57
Status:active» active (needs more info)

I'm confused. How preview for imagefield upload work? I have tried many times in my two drupal 5.1 installations and i give different result.

In first installation: Drupal 5.1/CCK 5.x-1.x-dev/Imagefield 5.x-1.x-dev on PHP 4.4 + MySQL 4.1

After uploading image through image field i get preview - i look into html (img tag) - path for previewed image is pointed to my files/imagefielduploaddir/image.jpg but there is physically no image.jpg in files/imagefielduploaddir/image.jpg and image is displayed?!

In my second installation: Drupal 5.1/CCK 5.x-1.x-dev/Imagefield 5.x-1.x-dev on PHP 4.4 + PostgreSQL 8.2

After uploading image through image field i get always no preview (html code look same as before, therefore i think that it seems to be correct).

That all in same browser.

#10

havran - February 7, 2007 - 10:04

Some additional info:

Installation 1: http://www.parcon.sk/t.php
Installation 2: http://moodle.uniag.sk/t.php

(maybe this safe_mode related?).

#11

havran - February 8, 2007 - 23:00
Status:active (needs more info)» active

Hmm, now i get idea how preview before real save image working. Image is stored in session and through drupal menu system is presented as real image (but physically don't exist) (interesting idea). But this not working in my server configuration, i have no picture in preview :( (but after i save node i get always picture). (first case - moodle.uniag.sk)

Opposite on this, another server always show preview picture but i observe this:

- after upload image i get preview but browser still loading something (and preview picture blink once).
- If i wait for end of loading and try save node, i have no picture in saved node.
- But if i save picture during "browser loading something" i have picture correctly saved in node.
(second case - www.parcon.sk)

I have no idea where is problem. On all my host i have PHP 4.4 with Suoshin patch (FreeBSD default configuration for PHP).

I make some research - i have installed clean installation FreeBSD 6.1 with apache 2.2 and PHP 4.4 on my computer, MySQL 5 and PostgreSQL 7.4 and two experimental Drupal 5.1 installation (one on MySQL and one on PostgreSQL) with actual cck and imagefield and i get on booth same behaviour as a first case).

#12

havran - February 9, 2007 - 11:56

Ok, i find preview and upload working if i have enabled Pretty URL -> preview image path is (always?) generated like pretty URL, maybe here is problem. If i try disable RewriteEngine Off - preview image is not show. (this working on all my Drupals installation from first case - see previous post).

#13

liquidcms - February 10, 2007 - 10:13

not sure if my prolem is the same but sounds similar.. i have latest of imagefield and cck for 4.7

when i submit my form image seems to work ok... when i edit the node and try to upload a new image... it deletes the old one but does upload a new one.

#14

liquidcms - February 10, 2007 - 10:31

a little more testing and i can see that when i do an edit and upload a new image it does actually get uploaded to php tmp directory - it just never makes it to files/

i think i have this exact same setup on another site i am doing... but it uses imagecache and seems to handle the edits fine... i guess i will try throwing that into the mix

#15

liquidcms - February 10, 2007 - 10:47

ok, my bad.. i was on .18 of imagefield.. and i guess there is a .22 now.. and sure it enough.. problem solved...

sweet.. thanks guys.

#16

havran - February 10, 2007 - 11:19

Ok another information - problem with no uploaded image on my site is related with my theme. I use slightly modified Graland theme. With default upload image working. Maybe this related with my blocks or something else.

... researching ...

Ok i fund it! !@#$! I use light striped LightBox Javascript for show pictures and if i try remove this i give upload working without problem.

Pretty URL problem is still here...

#17

MadKiller - February 13, 2007 - 04:28

Hello everyone,

I have the same problem. Here is a step-by-step research I made.

My platform is WinXP/IIS/MySQL 5. Drupal 5.1, ImageField downloaded today (12/may).
I installed imagecache (after manualy solving a table creation problem related to initialized "not null" blob fields) but didn't changed anything.

a) Uploading puts image on temp folder (my case, files/temp)
b) Clicking upload (not submit) generates the following url:
http://mysyte/dr/index.php?q=system/files/system/files/mypictures/image....
However, pic is saved under aleatory name in files/temp. (like tmpBB0.tmp)
c) I click submit, I get a missing image box (red X)
http://mysyte/dr/index.php?q=system/files/mypictures/image.gif
The image IS moved into the right directory (files/mypictures/image.gif).
I think something is not getting updated into the database.
Other references to another pictures works: http://mysyte/dr/index.php?q=system/files/mypictures/anotherimage.gif
(Will explain on why another images can be seen next)
d) I can dig around. Image still missing. Until I press edit: Bingo! The edit makes the trick.
Somehow a routine is called and updates the picture information (uf!).
e) Now the image appears everywhere using the url provided.
Some missing update was called...
f) Try to change the image. Same problem.
Need to press Edit to make the image appear.

Hope that helps...

#18

MadKiller - February 16, 2007 - 04:18

Ok, I made a change... I let Admin/Site Config/Filesystem ,changed download method to public.

Images still don't show up on preview, but now appears after I submit the post.

#19

dopry - February 18, 2007 - 01:12
Status:active» fixed

@all
unless you are absolutely sure the issue you are commenting on is the exact issue you're experiencing create a new issue. All you do is increase the noise ratio with. I think I have the same bug comments.

@havram
you have referenced
- exact image size as max size dimensions bug(duplicate).
- previews require clean urls

@ptalindstrom
you are experiencing normal behavior for a single value imagefield.

@MadKiller,
file your own issue.

Crell your required validation issue should be resolved in latest DRUPAL-5. If it is not please open a new issue. I'm closing this one as there is too much noise not related to the original issue.

#20

Anonymous - March 4, 2007 - 01:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.