Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.5
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2009 at 21:57 UTC
Updated:
22 Oct 2009 at 08:10 UTC
I'm building a module where I have a custom node. I wrote my hook_form to add some fields, and then in my hook_enable I call the CCK image field using content_field_instance_create. So my node should be a form with several text fields (defined in hook_form) plus the image field from CCK. The problem is that when I call the cck field, all my text fields show up twice! When I comment out the call to content_field_instance_create, my fields show up once, the way they should do.
Why is a call to content_field_instance_create causing fields that have nothing to do with cck to appear twice?
Comments
Comment #1
markus_petrux commentedRe: "Why is a call to content_field_instance_create causing fields that have nothing to do with cck to appear twice?"
content_field_instance_create() does not touch the node edit form, so this seem to be more related to your code. I'm afraid you need to debug your code and usage of CCK APIs to find out the cause.
Re: "I wrote my hook_form to add some fields..."
You may also need to implement hook_content_extra_fields() to allow users reorder your custom additions in the node edit form from the "Manage fields" page.