I'm getting Notice: Undefined index: #entity_type in eck_entity_view_alter() in my logs just when visiting a node view page. In the case of my nodes at least there is not a #entity_type set in $view. However if you look at the docs https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...

$type is passed into the function so you don't need to find it in the $view array (or $build according to the docs but I digress).

Here's a patch.

I may have adjusted a few formatting issues as well :D

CommentFileSizeAuthor
#9 eck-2119129.patch967 bytesjeff h
entity_view_alter.patch1.86 KBsonictruth
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ycshen’s picture

Status: Active » Needs review

change status

fmizzell’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

  • Commit 68109a7 on 7.x-2.x, 7.x-2.0.x, 7.x-2.1.x authored by sonictruth, committed by fmizzell:
    #2119129 Notice: Undefined index: #entity_type in eck_entity_view_alter...

  • Commit 68109a7 on 7.x-2.x, 7.x-2.0.x, 7.x-2.1.x authored by sonictruth, committed by fmizzell:
    #2119129 Notice: Undefined index: #entity_type in eck_entity_view_alter...

  • Commit 68109a7 on 7.x-2.x, 7.x-3.x authored by sonictruth, committed by fmizzell:
    #2119129 Notice: Undefined index: #entity_type in eck_entity_view_alter...
jeff h’s picture

This code seems to have vanished from 7.x-2.x HEAD and is still needed. Could you please re-commit this patch?

jeff h’s picture

Status: Closed (fixed) » Active

Reopening.

jeff h’s picture

FileSize
967 bytes

The original patch doesn't apply cleanly anymore. The attached one should.

  • fmizzell committed 717d7b6 on 7.x-2.x authored by jeff h
    Issue #2119129 by jeff h, sonictruth: Notice: Undefined index: #...
fmizzell’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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