Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
colinmccabe CreditAttribution: colinmccabe commentedComment #2
sunSounds like this issue is about image_import, not image_attach.
Comment #3
joachim CreditAttribution: joachim commentedCCK fields, or fields added by a custom module with its own field code?
Comment #4
colinmccabe CreditAttribution: colinmccabe commentedCCK.
Comment #5
colinmccabe CreditAttribution: colinmccabe commentedImage Attach also sets custom fields to null when adding images via the node edit form.
Comment #6
RobertNelsonVance CreditAttribution: RobertNelsonVance commentedI am having what appears to be a similar problem (http://drupal.org/node/1053046), have you found any solution?
Comment #7
joachim CreditAttribution: joachim commentedHow does CCK decide when to put in defaults? If it's doing so at the form level, it's probably doing the wrong thing...
Comment #8
RobertNelsonVance CreditAttribution: RobertNelsonVance commentedI 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!
Comment #9
RobertNelsonVance CreditAttribution: RobertNelsonVance commented>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).
Comment #10
joachim CreditAttribution: joachim commentedThe 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.