subi
subi

Reputation: 89

using custom CCK fields in node + Drupal 6 for some reason not accessible by $node ->field_name

I have created a custom CCK field and gave proper permission to users, but
for some reason I cannot access the field by using $node->field_name does anybody have Idea about this ?

Thanks In advance -S

Upvotes: 0

Views: 136

Answers (2)

subi
subi

Reputation: 89

I found that for some reason, in drupal 6 if we are using same CCK field for different content types, Nodes that had already created may not have the newly created field. When you edit and save the node. you will get the value for the new field.

Upvotes: 1

Ratul Saha
Ratul Saha

Reputation: 400

print_r($node->field_machine_readable_name) and see what it prints. You can use the devel module to see deep information about various fields and functions.

Upvotes: 1

Related Questions