Problem/Motivation

Notice: Undefined property: Entity::$id in eck_entity_view_alter() (line 888 of sites/all/modules/contrib/eck/eck.module).

Request URI: https://doimain.com/system/ajax
Referrer URI: https://doimain.com/node/23178/edit

Location  http://example.com/system/ajax
Referrer  http://example.com/node/23178/edit?destination=admin/content
Notice: Undefined property: Entity::$id in eck__entity__label() (line 147 of /sites/all/modules/contrib/eck/eck.module).

Location  http://example.com/system/ajax
Referrer  http://example.com/node/23178/edit?destination=admin/content
Notice: Undefined property: Entity::$id in eck__entity__label() (line 136 of /sites/all/modules/contrib/eck/eck.module).

http://example.com/system/ajax
Referrer  http://example.com/node/23178/edit?destination=admin/content
Notice: Undefined property: Entity::$id in eck__entity__label() (line 136 of /sites/all/modules/contrib/eck/eck.module).

http://example.com/system/ajax
Referrer  http://example.com/node/23178/edit?destination=admin/content
Notice: Undefined property: Entity::$id in eck__entity__label() (line 136 of /sites/all/modules/contrib/eck/eck.module).

http://example.com/system/ajax
Referrer  http://example.com/node/23178/edit?destination=admin/content
Notice: Undefined property: Entity::$id in eck__entity__view_callback() (line 547 of /sites/all/modules/contrib/eck/eck.entity.inc).

Location  http://example.com/system/ajax
Referrer  http://example.com/node/23178/edit?destination=admin/content
Notice: Undefined property: Entity::$id in eck__entity__view_callback() (line 542 of /sites/all/modules/contrib/eck/eck.entity.inc).

Proposed resolution

Use entity_id() function to get the proper entity identifier.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Needs review
FileSize
589 bytes

$entity->id may not always exist.

joelpittet’s picture

Here's a better approach because I got a bunch of the same error in different spots of ECK.

joelpittet’s picture

Issue summary: View changes

Added all the location notices I have from a recent bout of this in watchdog.

joelpittet’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
FileSize
6.47 KB

I keep getting the wrong version... anyways this is just a re-roll because head moved.

joelpittet’s picture

Will likely conflict with #2619920: Possible spelling mistake in variable name: $tile instead of $title. If you commit that I'll re-roll this again.

joelpittet’s picture

Re-rolled.

  • fmizzell committed c37d99d on 7.x-2.x authored by joelpittet
    Issue #2607746 by joelpittet: Notice: Undefined property: Entity::$id in...
fmizzell’s picture

Status: Needs review » Fixed
joelpittet’s picture

Thank you @fmizzell

Status: Fixed » Closed (fixed)

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