This error occurs on every content type that is not utilzing a conditional state, on a fresh(ish) install of Drupal 7.15.
Notice: Undefined property: stdClass::$content in field_conditional_state_entity_view() (line 136 of /path/to/site/sites/all/modules/field-conditional-state/field_conditional_state.module).
The log contains the above error, and the following warning:
Warning: Invalid argument supplied for foreach() in field_conditional_state_entity_view() (line 136 of /path/to/site/sites/all/modules/field-conditional-state/field_conditional_state.module).
If this is not relevant or has been fixed in 7.x-1.x-dev please ignore.
Edit: My install of Drupal is not completely fresh. I have ctools and a custom module turned on, but I am not interacting with Field Conditional State directly. My custom module has an implementation of hook_node_presave() to modify the node's path based on a field's content.
Comments
Comment #0.0
carwin CreditAttribution: carwin commentedI was wrong about not having any non-core modules turned on. This edit reflects that.
Comment #1
carwin CreditAttribution: carwin commentedI tried to go back and fix this error, but I can no longer reproduce it. Marking it as such.
Comment #2
Drethic CreditAttribution: Drethic commentedI had this same issue. I am using a Media: Youtube field when the error flies. Any other layout of my node doesn't have any issues. I took at look at $entity and it doesn't have a content entry. I used this code to fix it:
This was placed on lines 136-155 of field_conditional_state.module. I have not seen any negative effects of the code on my content but please test it out and see if it works.
Comment #3
knretaleato CreditAttribution: knretaleato commentedI had the same issue on any pages using MediaFront to display nodes even though I did not have conditional states on any of their fields. #2 solved my issue.
Comment #4
Echofive CreditAttribution: Echofive commentedI've the same issue too.
I've solved this using the code in the comment #2.
I've created a patch based on this code.
Comment #5
eminencehealthcare CreditAttribution: eminencehealthcare commentedPatch works for me. Thanks!
Comment #6
Tobias Xy CreditAttribution: Tobias Xy commentedI edited patch #4 to match the current dev version. Since there isn't a substantive change of the code, I'll set this issue to RTBC.
Comment #7
Tobias Xy CreditAttribution: Tobias Xy commentedCommitted. :-)
Comment #8.0
(not verified) CreditAttribution: commentedTypo.