I attach below the relation I defined in which every rehearsal can have many rooms (max 4 rooms).
At mysite/node/add/rehearsal I have these error messages:
Warning: Illegal offset type in field_info_instance() (linea 702 di /.../drupal7/modules/field/field.info.inc).
Warning: Illegal offset type in isset or empty in field_info_instances() (linea 684 di /.../drupal7/modules/field/field.info.inc).
Warning: Illegal offset type in isset or empty in field_info_instances() (linea 684 di /.../drupal7/modules/field/field.info.inc).
I think this is related to http://drupal.org/node/1363468.
When I submit the form to add a new rehearsal, I obtain this error message:
Warning: Illegal offset type in field_info_instance() (linea 702 di /.../drupal7/modules/field/field.info.inc).
Warning: Illegal offset type in isset or empty in field_info_instances() (linea 684 di /.../drupal7/modules/field/field.info.inc).
Warning: Illegal offset type in isset or empty in field_info_instances() (linea 684 di /.../drupal7/modules/field/field.info.inc).
EntityMalformedException: Proprietà bundle mancante in entità di tipo relation in entity_extract_ids() (linea 7409 di /.../drupal7/includes/common.inc).
The effect is that all the rooms are created, but there is no way to create a new rehearsal.
Here the code about the relation:
$relation_type = new stdClass;
$relation_type->disabled = FALSE; /* Edit this to true to make a default relation_type disabled initially */
$relation_type->api_version = 1;
$relation_type->relation_type = 'has';
$relation_type->label = 'has';
$relation_type->reverse_label = 'belong';
$relation_type->directional = 1;
$relation_type->transitive = 0;
$relation_type->r_unique = 1;
$relation_type->min_arity = 2;
$relation_type->max_arity = 2;
$relation_type->source_bundles = array(
0 => 'node:rehearsal',
);
$relation_type->target_bundles = array(
0 => 'node:room',
);
Comments
Comment #1
Anonymous (not verified) commentedI tried also with 7.x-1.x-dev and now cannot see the subforms any more. I recreated the field
field_roomsthat is the field in which should be saved the information about the relation, but I cannot see the subforms yet.When I submit rehearsal form, now the rehearsal is created, but I cannot create any room and I obtain this error message:
Comment #2
fox_01 commentedi got the same error. Created a Relation type with all bundles of nodetypes as source bundles. Then i added the field relation edit widget with that relation type selected. The subform is shown only with the 7.x-1.0 correctly but not with the dev. The nodes are created but not the relation itself.
Got anyone an idea?