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

StackOverflow https://stackoverflow.com/questions/11258992

  •  18-06-2021
  •  | 
  •  

Pregunta

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

¿Fue útil?

Solución 2

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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top