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
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top