I updated to the latest dev with some existing relation types and I now get the following Notice when I visit the 'manage display' (admin/structure/relation/manage/employed_by/display) page for any relation type:
Notice: Undefined index: view_modes in relation_endpoint_field_formatter_settings_summary() (line 213 of /home/dm7/sites/example.ca/modules/contrib/relation/relation_endpoint.module).
If I try and view a particular relation I get three messages and the endpoints are not displayed:
Notice: Undefined index: view_modes in relation_endpoint_field_formatter_view() (line 241 of /home/dm7/sites/example.ca/modules/contrib/relation/relation_endpoint.module).
Notice: Undefined variable: endpoints in relation_endpoint_field_formatter_view() (line 269 of /home/dm7/sites/example.ca/modules/contrib/relation/relation_endpoint.module).
Warning: Invalid argument supplied for foreach() in relation_endpoint_field_formatter_view() (line 269 of /home/dm7/sites/example.ca/modules/contrib/relation/relation_endpoint.module).
I have run updatedb and cleared caches multiple times.
Here is an export of one of my relations just in case it helps:
$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 = 'employed_by';
$relation_type->label = 'Employed by';
$relation_type->reverse_label = 'Employed by';
$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 => 'user:user',
);
$relation_type->target_bundles = array(
0 => 'organization:*',
);| Comment | File | Size | Author |
|---|---|---|---|
| #13 | view_modes_to_table_formatter-1415750-13.patch | 493 bytes | mikran |
Comments
Comment #1
acrazyanimal commentedAnyone else having this issue?
Comment #2
rlmumfordI have a similar problem on the relation view page. When I go to the view the relation i see the following errors:
Comment #3
rlmumfordI also get the error on the view modes page
Comment #4
franzI had this after upgrading from beta2 to rc2
Comment #5
BrandonCapitalism commentedI as well.
Comment #6
onomated commentedSame here: Relation 7.x-1.x-beta1
Comment #7
nickvidal commentedMe too. Even on a fresh install.
Comment #8
sheldonkemper commentedSame problem with Relations 7.x-1.0-rc2
Comment #9
mikran commented#2 is not related to this issue.
In addition to settings I found more problems with the relation endpoints table. relation/% displays endpoints correctly with 'Full entities list' formatter but with endpoints table just the label is displayed.
Comment #10
Chris Gillis commentedIt seems this might be a duplicate of http://drupal.org/node/1450794, but I'm not entirely sure, so hesitate to mark it as such.
Comment #11
bunthorne commentedI got the error with Relation rc2 and D7.14. I followed #10 and updated to Relation dev, but problem is still there.
Notice: Undefined index: view_modes in relation_endpoint_field_formatter_settings_summary() (line 213 of-snip-/sites/all/modules/relation/relation_endpoint.module).Comment #12
marcusx commentedI opened a new issue #1563678: Endpoints table formatter is displaying label only for the additional problem (table not showing up) described in #9 and uploaded a patch to fix this.
Comment #13
mikran commentedsimple fix
Comment #14
mikran commentedWhile testing #1606736: Relation incorrectly assumes that all entity types have a entitytype_view() function I found more issues with ECK entities: "Notice: Undefined index: eck_employee in relation_endpoint_field_formatter_settings_summary() (line 221 of /.../relation/relation_endpoint.module).". relation_endpoint_field_formatter_view() defaults view_mode to 'full' if not set so I believe the same approach would be the working solutions for this settings form as well.
Comment #15
Chris Gillis commentedConfirm #13 appears to work (error disappears)
Comment #16
Johnny Jackson commentedAdded both patches identified in this thread and all of my errors have gone away. Thanks
Comment #17
mikran commentedThose errors look like errors from rc2, try with the latest dev and this patch.
I'll try to find time this weekend to fix this properly
Comment #18
mikran commentedComment #19
scottrigby@mikran that looks right. From the documentation of
hook_field_formatter_info(), this matches the settings inrelation_endpoint_field_formatter_settings_form()(as defined inrelation_endpoint_field_formatter_view()). AFAICT no refactoring is needed =)Comment #20
mgiffordAny ideas about bringing this patch from June into the repository?
Comment #21
chx commentedComment #22
mgiffordThanks @chx!
Comment #23.0
(not verified) commentedoriginally made a mistake with messages