When I try to add an 'image' field I'm greeted with the errors:

    * warning: Cannot use a scalar value as an array in /var/www/html/drupal-4.7/modules/flexinode/field_image.inc on line 137.
    * warning: Cannot use a scalar value as an array in /var/www/html/drupal-4.7/modules/flexinode/field_image.inc on line 138.
    * warning: Cannot use a scalar value as an array in /var/www/html/drupal-4.7/modules/flexinode/field_image.inc on line 139.
    * warning: Cannot use a scalar value as an array in /var/www/html/drupal-4.7/modules/flexinode/field_image.inc on line 140.

I do not currently have image.module enabled either. Tested with Drupal 4.7-beta fresh install.

Comments

kiev1.org’s picture

Fill all fields of properties image for example 1000x900 - they should not be equal to zero anywhere

budda’s picture

This error occurs straight after I have selected the field type. I have not attempted to submit the field yet.

scroogie’s picture

Please try flexinode from CVS.

budda’s picture

I'm using flexinode.module from CVS
// $Id: flexinode.module,v 1.64 2005/12/20 14:40:33 morbus Exp $

Along with Drupal 4.7beta3

budda’s picture

I can't seem to recreate the error today. Even when i leave the textfields for the various dimensions empty.

Also - if the dimension fields should not be empty/or 0 then maybe the form validation for the field element needs improving?

Kayla’s picture

Title: Adding 'image' field to a new content type » same issue

Hello, I also received the same warnings- when attempting to add an image field using flexinode-4.7.0 with drupal-4.7.0-beta3. (I hope I too will soon no longer be able to replicate this, grin.) I do not have any version of image.module installed.

Kayla’s picture

Title: same issue » Adding 'image' field to a new content type

I am sorry, I did not realize I would change the title of this entire issue thread when posting my comment. The "title" field is required for me and I didn't know not to change it- is that how you both avoided having a comment titles?

My further followup, (which might be a separate "issue"?) is that when I ignored the said warnings and created this new node type with the image field with the parameters 400x400 for image, 400x400 for image preview, 200x200 for image thumbnail and 100kb for file size... if I attempted to upload an image larger than 400x400, I did receive a message about how I've exceeded the given paramerers, but if I attempt to upload an image within the parameters, I get the message: You must fill in the field "Image". This happens when I select to preview or submit the entry. You could say that the image choosen does not "stick".

texas-bronius’s picture

I too get the "must fill in field [field_name]", and, in addition, I've noticed in my Administrator messages this error:
For /tmp/phpox7YHR the system thinks its MIME type is while the user has given image/jpeg for MIME type
indicating that the mime type is not being properly read... If the field is set as not required, it just glosses over the img, and the file is not processed (and discarded). I have seen two issues (1 2) reported relating to this (regarding swf and png), but I assumed those were addressed in 4.7 core, b/c I had no luck with the patches...?

texas-bronius’s picture

Is it possible that some Image module is required for 4.7-beta? The only one I found was for 4.6, and I have been assuming that Image is built in to 4.7 core.

texas-bronius’s picture

For what it's worth, two more cents:
Just installed and using the Image module from cvs, I was able to upload images just fine with the Image module. The same "For /tmp/phpomWyuQ the system thinks its MIME type is while the user has given image/jpeg for MIME type" message still appears in Administraotr[Logs]. Flexinode image upload still not working for me.

susie’s picture

The problem is that it is looking at it as objects, rather than as an array.
I changed the four lines to be:
if (!isset($field->options)) {
$field->options = array(1 => '800x600', 2 => '512x384', 3 => '100x100', 4 => '100');
}

and it seems to work.

Susie

g76’s picture

Title: Adding 'image' field to a new content type » Same Problem.

Having the same problem. The last comment on here refers to changes lines. Could anyone expalin this further. I am new to all this so bear with me. In what file, and where is it, that I change the lines? Is It:modules/flexinode/field_image.inc?

Also, has anyone else attempted this with success?

Jen

g76’s picture

Title: Same Problem. » Flexinode Problem

Sorry, I just changed the title too.

Jen

RayZ’s picture

Title: Flexinode Problem » Adding 'image' field to a new content type
Bèr Kessels’s picture

Version: » 4.7.x-1.x-dev
Component: Code » Field type: image
Bèr Kessels’s picture

Status: Active » Closed (duplicate)