Hello,

The imagefield module has been working, which you can see here: http://earthwizards.com/bio

However, today the client reported that he couldn't update the placeholder pictures. When trying to upload a picture to an existing bio or creating a new one, you get this:

"An error occurred:


Fatal error: Cannot pass parameter 1 by reference in /home/earthwiz/public_html/sites/all/modules/imagefield/imagefield.module on line 1029
"

I know it was working previously, but I'm not sure if anything else has been changed (it's hasn't been around long enough to have gone through many updates). I do know that the Files directory Permissions are 755.

Thanks for any assistance,

Jim

Comments

dopry’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

umm can you grab me the CVS id out of the imagefield.module? It should be on the first few lines and looks like
// $Id: imagefield.module,v 1.30.2.6.2.52 2008/04/20 02:33:03 dopry Exp $

I know this isn't an issue in head now....

jimmb’s picture

Hi dopry, thanks for the reply. The id is:

// $Id: imagefield.module,v 1.30.2.6.2.43 2008/02/21 11:44:54 dopry Exp $

I just tested it again and now and uploading *does* work, but it appears the imagecache preset isn't resizing the photo....

Cheers,

Jim

dopry’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

then closed.. update imagecache & imageapi... I broke some formatters... also try clearing cache.

Ek0’s picture

Version: 5.x-2.0-rc6 » 5.x-2.1

Hi, I get the same error...
http://farm4.static.flickr.com/3064/2846122072_949231d126_o.png

I cleared my cache several times, try different versions of imageapi, imagecache and image field, including the developpement snapshots, but I still get it...

My imagefield.module CVS id is currently:
$Id: imagefield.module,v 1.30.2.6.2.64 2008/05/13 00:02:02 dopry Exp $

ps: It seems the problem comes from a form_alter I made... But I never touch this field. I tried to specify a weight of 20 on the ImageField, but it did not solve the problem.

Ek0’s picture

Sorry for the double post, I juste solved it... Hope his can help !

I did my form_later passing form_id by reference:
function mymodule_form_alter(&$form_id, &$form) {}

Doing this way, it works...
function mymodule_form_alter($form_id, &$form) {}

decibel.places’s picture

I am getting the error in version = "5.x-2.6" ; $Id: imagefield.info,v 1.4.4.3 2008/04/19 23:17:02 dopry Exp $


Fatal error: Cannot pass parameter 1 by reference in /home/locavore/public_html/sites/all/modules/imagefield/imagefield.module on line 1170

and the image is added twice in a custom content type

line 1170 is $function('imagefield_js', $form);

I tried rolling back to 5.x-2.1 but got the same error

I commented out line 1170, now the module is working without an error and without generating duplicate images

I had the same problem in the D5 upload module, and commenting out line 907 (same code as here) fixed the problem.

TC44’s picture

Same problem here. Has been working fine for the last 6 months (no updates), and just started spitting errors today. Uploading an image now produces this error:

An error occurred:

Fatal error: Cannot pass parameter 1 by reference in /home/public_html/sites/all/modules/imagefield/imagefield.module on line 1157

EDIT: mine seemed to be a conflict with anonymous comments module (which was recently installed).

Removed it and all is working.