Used ECK to create a new entity type called 'model.'
Created relation type where a model bundle is one of the endpoints.
Edited a relation and hit save to get to the 'view' page of the relation, got an error about function model_view() not being found in relation_endpoint_field_formatter_view(), on line 277 of relation_endpoint.module.

Relation should run the function name through function_exists() before trying to call it.

In my case I have the Entity module installed, so I was able to put together a simple work around:

function model_view($entity, $view_mode) {
  return entity_view('model', array($entity->id => $entity), $view_mode);
}

entity_view() is part of the Entity module.

CommentFileSizeAuthor
#2 1606736.patch1.1 KBchx

Comments

yuriy.babenko’s picture

Title: Relation incorrectly assumes that all entity types have a entitytype_load() function » Relation incorrectly assumes that all entity types have a entitytype_view() function
chx’s picture

Component: Relation admin » API
Status: Active » Needs review
StatusFileSize
new1.1 KB

Please test.

Status: Needs review » Needs work

The last submitted patch, 1606736.patch, failed testing.

chx’s picture

Version: 7.x-1.0-rc2 » 7.x-1.x-dev
chx’s picture

Status: Needs work » Needs review

#2: 1606736.patch queued for re-testing.

mikran’s picture

Status: Needs review » Reviewed & tested by the community

Ohh this function has had fair share of bugs recently. I didn't have any experience with ECK before but nice to try new modules I guess. The patch works for what it's supposed to do. In the process I found other issues but I'll open new issue for that.

mikran’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

fixed typo