EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7389 of /mnt/www/html/.../docroot/includes/common.inc)

Comments

Vlad Vinnikov’s picture

Status: Active » Closed (won't fix)

Problem is resolved by installing 7.x-1.x-dev version of the module.

drcho’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.2
Status: Closed (won't fix) » Active

I'm using the 7.x-1.2 version with DOMPDF (0.6.0 beta 3) and I'm getting the same error...

EntityMalformedException: Fehlende Paketeigenschaft auf einem Element des Types node. in entity_extract_ids() (Zeile 7663 von /var/www/drupal/includes/common.inc).

Drupal Version is 7.22 and it only happens when trying to print any view.

Any ideas why this problem occurs or any suggestions?

drcho’s picture

Status: Active » Closed (works as designed)

Now I found the source of the error. Her the solution

It was a function in my template.php:

mytheme_preprocess_page(&$variables)
  {
  //...
  if (@$variables['node']; != "")
  {
    $field_myfield = field_get_items("node", $node, "field_myfield");
  }
  //...
}

There was a Variable named 'node', but it hadn't the property 'type', and that caused the exception.

So I changed the code to:

mytheme_preprocess_page(&$variables)
  {
  //...
  if (isset(@$variables['node']->type))
  {
    $field_myfield = field_get_items("node", $node, "field_myfield");
  }
  //...
}