I created a few custom required fields for the image node type. These fields are set to null, not to the default value, by the image importer. This causes problems further down the line.

I can change the nulls to default values by going to the edit page of each new image node and resubmitting, but this is a pain.

Comments

colinmccabe’s picture

Priority: Normal » Minor
sun’s picture

Component: image_attach » image_import

Sounds like this issue is about image_import, not image_attach.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

CCK fields, or fields added by a custom module with its own field code?

colinmccabe’s picture

CCK.

colinmccabe’s picture

Image Attach also sets custom fields to null when adding images via the node edit form.

RobertNelsonVance’s picture

I am having what appears to be a similar problem (http://drupal.org/node/1053046), have you found any solution?

joachim’s picture

How does CCK decide when to put in defaults? If it's doing so at the form level, it's probably doing the wrong thing...

RobertNelsonVance’s picture

Title: No CCK Field(s) on Image Import Page / Required CCK Field(s) Set as Null on Image Import » No CCK Field(s) on Image Import Page / Required CCK Field Set as Null on Image Import

I respectfully contend that if you're going to mark my - similar, yet different - issue (http://drupal.org/node/1053046) as a duplicate of this issue, then the title of this issue should be changed to accurately reflect both.

This issue was formerly only highlighting that when image nodes were created using Image Import, the image node creation process ignored CCK fields assigned to the Image node type; thus resulting in the CCK fields being stored as null.

My issue highlighted that CCK fields assigned to the Image node type are not visible on the Image Import page. This results in the user having to visit each Image node's edit page after import and setting the CCK value manually. I would like to see either 1) CCK fields assigned to the Image node type appear for each image being imported (like the Title and Body fields do), and/or 2) that the CCK fields assigned to the Image node type appear at the bottom of the Image Import page (like Taxonomy does) and applies to all new Image nodes imported.

Thanks for any further assistance!

RobertNelsonVance’s picture

Title: Required field set as null when importing images » No CCK Field(s) on Image Import Page / Required CCK Field(s) Set as Null on Image Import

>How does CCK decide when to put in defaults? If it's doing so at the form level, it's probably doing the wrong thing...

@joachim: Also, I am not sure how CCK handles the defaults. Probably a question for someone who knows more about CCK (http://drupal.org/node/1053220).

joachim’s picture

Title: No CCK Field(s) on Image Import Page / Required CCK Field Set as Null on Image Import » programmatically created nodes (in import or attach) don't get required fields
Category: feature » bug
Status: Postponed (maintainer needs more info) » Active

The problem in all cases is best expressed thus:

The user's action causes a node to be created programmatically, either during import or attaching.
We can't possibly know all the things that other modules wish to save into new nodes -- it's simply not feasible. This includes both providing a form for the user to set values, and setting defaults for those other modules' node properties. As I said, taxonomy is a special case that's been put into image import and image attach.

Therefore, I contend that it's up to other modules to put in their defaults when a node is being saved, whether it's from a node form or programmatically.