Commit 2563769e authored by valderama's avatar valderama Committed by fago

Issue #1621002 by grahl, valderama, mfb, fago: Cardinality breaks node indexing on main body

parent 804d38bf
......@@ -163,4 +163,10 @@ function entity_metadata_node_entity_property_info_alter(&$info) {
'auto creation' => 'entity_property_create_array',
'field' => TRUE,
);
// Make it a list if cardinlity does not equal 1.
$field_body = field_info_field('body');
if (isset($field_body) && $field_body['cardinality'] != 1) {
$info['node']['properties']['body']['type'] = 'list<text_formatted>';
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment