Hi,

I have a custom node gallery relationship and for the image type content I have a field (text type) configured with default value (php code that assigns a custom unique identifier to the image). This field is also enabled in the "manage image fields" section of the node gallery setting.
But when I go to the manage image tab after uploading the images, the field (with default values) is blank. Also it's blank in the image content edit tab.

Can anyone tell me how to populate the field (with default values) in manage image tab or image edit tab?

Thanks

Comments

justintime’s picture

I could certainly buy that the Manage Images tab might be breaking that field, but we don't really do much at all with the node edit form. Can you try adding the field to another content type and see if your default values work there? I wonder if it's an issue in the field itself.

adasgt’s picture

Thanks Justin for your quick reply.

You are right, node edit works for all contents. What I meant is that, if an image is uploaded through the node gallery functionality, the field with default values is blank in edit page of the image.

Could you please tell me where to look for the fix?

justintime’s picture

What method are you uploading via? plupload, or the default imagefield widget? If it's plupload giving you problems, can you verify you don't have the problem when you add an image via node/add?

adasgt’s picture

I verified. Image widget upload works fine. I am using plupload and it fails to populate default values.

justintime’s picture

Title: Default values does not show up either in Manage Image Tab or in Gallery image edit page » Default values using php code on cck fields aren't populated when using plupload
Project: Node Gallery » Plupload integration
Version: 6.x-3.x-dev » 6.x-1.x-dev

Ok - node gallery doesn't do anything custom wrt cck and plupload, so I'm pretty sure this is a plupload bug. Moving it over there for further discussion.

justintime’s picture

Found this: http://drupal.org/node/705588

So, the problem is that CCK is setting those default values via a form, not via nodeapi. Since plupload never renders a form, that's why these don't get added.

I'm bowing out of this issue - I don't know enough about the underlying technologies to determine if this is something that CCK needs to fix, or if plupload needs a workaround.