It appear that when the token module (noticed it with version 7.x-1.0-beta5) is installed, viewing a node (comments enabled) will output the following warning:

Notice: Undefined property: stdClass::$node_type in entity_extract_ids() (line 7379 of includes/common.inc).

This is with drupal 7.7.

Comments

drikc’s picture

Status: Active » Needs review
StatusFileSize
new665 bytes

Token module implements on behalf of field.module the hook_tokens(...) which call entity_extract_ids($entity_type, $entity) where $entity need to have the 'node_type' attribute.

The given patch address this.

drikc’s picture

The patch looks also useful for Drupal 7.8 which without will throw the following error instead of the previous warning:

EntityMalformedException: Missing bundle property on entity of type comment. in entity_extract_ids() (line 7389 of includes/common.inc).
drikc’s picture

Title: Notice: Undefined property: stdClass::$node_type in entity_extract_ids() ... » EntityMalformedException in entity_extract_ids()
arhak’s picture

arhak’s picture

Assigned: Unassigned » drikc

@drikc: feel free to work with dev, you've been granted with write access

drikc’s picture

Thanks arhak ;-), did commit the patch to master.

ac’s picture

Patch in #1 works on the 2.x branch - please roll a new alpha release of the 2.x as this module is currently useless without that patch.

drikc’s picture

I've pushed a release tag 7.x-2.0-alpha2 on master but I'm not granted for adding release package. arhak?

arhak’s picture

@#8 granted drikc

drikc’s picture

Status: Needs review » Fixed

7.x-2.0-alpha2 release added.

ac’s picture

Thanks for the quick response guys

Status: Fixed » Closed (fixed)

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