The above error appeared in a Biblio module theme function after upgrading core from 7.4 to 7.8, and none of the discussions on this site helped in getting rid of it.

As far as I can tell this is a problem with core functions, not with the Biblio module itself, and I can motivate my opinion with a simple test case:

  • I created a new content type AAATestContent, and added to it a field "field_taxonomy_test" of type "Term reference"
  • I inserted a new item for this content, and did not fill the value for "field_taxonomy_test"; let's say the added node was 1234
  • when executing the following snippet in drush, everything works as expected:
    $node = node_load(1234);
    $fields=field_attach_view('node',$node,'full','en');
    var_export($fields);
    

    and I obtain

    array (
      '#pre_render' => 
      array (
        0 => '_field_extra_fields_pre_render',
      ),
      '#entity_type' => 'node',
      '#bundle' => 'aaaatestcontent',
    )
    
  • now I edited the node again, this time adding a value in "field_taxonomy_test"
  • the above snippet now fails miserably:
    EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7389 of .../home/includes/common.inc).
    

    In this test, no external module should be involved apart from Field API and Taxonomy - but I might not know my Drupal ways well enough, so please correct me if I'm assuming something wrong.

    I'm willing to help with more tests or even code in order to get the issue solved - but I need advice from people with better Drupal skills than mine.

    Thanks a lot in advance,

    Antonio

Comments

bojanz’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 7.x-3.x-dev » 7.x-dev
Component: taxonomy data » entity system

I see no reason why this issue should be in the Views issue queue.

damienmckenna’s picture

Status: Active » Closed (duplicate)

(see above)