Scenario:
- Search API view
- Relationship to related node (Relation module)
- Field for node title, using relationship

Expected:
Node title of related node should be displayed.

Experienced:
No value displayed for node title.

The same happens with any other property/field of the related node.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

milesw’s picture

Status: Active » Needs review
FileSize
1.11 KB

Looks like the bug was introduced in version 1.3...

#1796110: Rendered entity fields show same result

The small change in this patch seems to restore things to normal.

Paul B’s picture

Version: 7.x-1.x-dev » 7.x-1.3
Priority: Normal » Critical
Status: Needs review » Needs work
Issue tags: +Regression, +views

Another scenario:
- Create a view for users
- Add a relationship to profiles (profile2)
- require this relationship
- add a field 'rendered profile' displayed as entity label

This gives me a fatal error:

PHP Fatal error:  Call to undefined method stdClass::label() in sites/all/modules/contrib/entity/entity.module on line 1104

The patch gets rid of the error but the label is not rendered. If I revert to entity API 7.x-1.2, it works fine.

k.skarlatos’s picture

I have the following scenario:
A view of taxonomy terms, that has a relationship that shows "content with terms". i then use the "Content: Rendered Node" field, and it does not show any results.

The patch fixes my issue.

Jawi’s picture

Same issue here. No items of views relations are shown.

https://drupal.org/comment/8366731

Patch fixed this issue. Patched tested and ok!

Eric_A’s picture

Status: Needs work » Closed (duplicate)

Duplicate of the older #2171689: EntityMalformedException: after upgrade from 7.x-1.2 to 7.x-1.3. (And where we have a core maintainer's attention and guidance.) Patch here is an exact duplicate.

Status: Closed (duplicate) » Needs work

The last submitted patch, 1: entity-2174645-1-views-relationships.patch, failed testing.

drumm’s picture

Status: Needs work » Closed (duplicate)
ayalon’s picture

thanks! this solved my problems!

GiorgosK’s picture

No need to patch anything

just download the latest entity 7.x-1.x-dev 2014-Jan-21 or later
which incorporates this fix above which is duplicate of fix in #2171689: EntityMalformedException: after upgrade from 7.x-1.2 to 7.x-1.3

r2coder’s picture

This issue has resurfaced;
Steps to duplicate:
Run cron via Drush.

Error: Call to undefined method stdClass::label() in /sites/all/modules/contrib/entity/entity.module, line 1134

System Particulars
Drupal: 7.35
PHP: 5.6.5
CentOS: 6.5
Apache 2.2

Entity related modules
Entity API 7.x-1.6
Entity cache 7.x-1.2
Entity reference 7.x-1.1
Entity Reference View Widget 7.x-2.0-rc6
Entityform 7.x-2.0-rc1
Entityreference prepopulate 7.x-1.5

saurabh.tripathi.cs’s picture

Using below modules:
Views 7.x-3.7
Entity API
7.x-1.2

On running cron i get below error:

Call to undefined method stdClass::label() in /sites/all/modules/contrib/entity/entity.module on line 1051