Simple one here... If you add any resolutions limits to imagefield it results in errors during add/edit like:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'file_validate_image_resolution_help' was given in /var/www/html/drupal/drupal-6.3/sites/all/modules/filefield/filefield_widget.inc on line 223.

Looks like it should be 'filefield_validate_image_resolution_help'... patch included. Nice to see AHAH back. :)

CommentFileSizeAuthor
imagefield-6.x-3.x-res-validate.patch624 bytesMoonshine

Comments

drewish’s picture

make sure you're running HEAD of filefield. it should have that function in there. dopry didn't want to put a function exists check in.

Moonshine’s picture

Well I am using HEAD for both, but filefield HEAD doesn't have 'file_validate_image_resolution_help'.

It looks like all of its validate/help functions are prefixed with 'filefield_validate_' rather then 'file_validate_'. Thus the patch.. :)

drewish’s picture

Status: Needs review » Fixed

my bad it looks like dopry went through and renamed them... without creating an issue... grrr.

committed to HEAD.

capellic’s picture

I downloaded from HEAD and it cleared the issue - thanks!

ica’s picture

how can i download the HEAD of the imagefiled it seems not listed on releases -
http://drupal.org/node/72560/release

some module releases icludes the HEAD's on their list but it seems not the case with imagefield, can someone point to? thanks

Moonshine’s picture

The dev version for imagefield is actually from HEAD:

http://drupal.org/node/96519

ica’s picture

Thanks Moonshine, i have updated to the 'HEAD' dev the Warning as on the original report on top disappeared but when i tried to submit a new node with imagefield or edit a published node with imagefield i still get

The Image upload failed.

error.

so unlike user capellic above i can confirm that it cleared the Warning above but i am not be able to upload or edit a node with imagefield :(
-too bad maybe i should not switch to the imegefield from the image.module,
but abliviously images as a CCK field gives more flexibility play around the views field function
-if and when the module works

Moonshine’s picture

I would make sure you have the latest HEAD/dev versions filefield, imagefield and possibly even cck if you are comfortable with that. And then run "/update.php" on your site after having them in place just to make sure everything get's re-cached properly and any/all updates have been applied.

If you still can't upload with the field you've created, I'd even try creating a new field to test it with. Things should "work" with Imagefield/Filefield right now, but it is still a little rough around the edges.

ica’s picture

Thanks Moonshine, I followed your instructions step by step

I downloaded the filefield.module version
6.x-3.x 2008-Aug-20 - Guess this is the HEAD!? -there is not seem to be a -filefield module 6.x-3.x dev'
the 'Official release' is 6.x-3.0-alpha3 - 2008-Aug-15

so the HEAD must be 6.x-3.x as its last update is 20th Aug.

- i deleted the old' filefield.module replaced with the v 6.x-3.x
- run update.php - but it did not run an update -that means there was not update script for this version.. so no DB updates run.
- I tried to re edit a node with an imagefield
it gave the same 'error' [The Image upload failed.] no further Warnings to indicate anything specific
I tried to submit a new node - the result was the same - the node even did not submitted because it falls back/stacks at the edit mode because of that error

- I went back to the CCK filed settings and deleted the field completely the imagefield than created a new imagefiled

- than edited a node -the same error -created a new node and got the same error -
therefore nothing seems to change back to square one after the circles :(

Moonshine’s picture

Hmm.. well then for some reason field_file_save_upload() is failing to save the file on your system. My first guess would be directory permissions where you're asking to have it saved. however, in the end it could be any number of things. If you know some php you could put a few statements to try and debug it in field_file.inc in the field_file_save_upload() function. The message you are getting is from that function failing.

The latest filefield is this: http://drupal.org/node/96616
The latest imagefield is this: http://drupal.org/node/96519
The latest CCK is this: http://drupal.org/node/266142

ica’s picture

Hi again Moonshine, thanks
- i have downloaded once more the versions you pointed
deleted the filefield and imagefield and replaced the latest
run update.php -no DB updates executed, than this time i've got the error below an blank 'dead' site


Fatal error: Call to undefined function filefield_field_settings() in /home/sites/all/modules/imagefield/imagefield.module on line 134

things seems getting worst when one tries to find solution to a problem
i left the CCK dev to the last -currently have the 'official' 6.x-2.0-rc6 the offical relases sould be the most working' ones does not it ? -in theory-

so, in order to get the site back from the death, i have to delete the imagefiled and filefield.modules
than to your instruction i updated to the CCK dev - run the update.php -it updated on1 DB table.. than site was back
... once more i updated the filefield first than imagefield the versions you pointed
i set re-setup an imagefiled CCK -which i deleted before.. did the basic imagefiled settings -no limits to file sizes etc.

than i tried to edit an article i have got the same error once more
(The Image upload failed.)

goin' 'round the circles once more

Moonshine’s picture

Well you are certainly getting some bizarre errors. filefield_field_settings() is definitely in Filefield as you can see in filefield.module, so all I can think is that Filefield somehow wasn't and active module in your setup.

At this point it's probably best to concentrate on the error you are getting "The Image upload failed." as it has to do with the actual file being saved, and I haven't really seen any other reports of that. Are you choosing a custome path where the images are to be saved? Are you able to upload files from any other modules?

All of these modules (including CCK) are still under development. So while RC6 may be the last "official" version of CCK, there have been two week of bug fixes and changes in the dev version. I don't *think that's your problem here though. Really you need to get at why filefield is saying it can't save your image.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.