Hey there,

at some point the Drupal core got extended by the possibility to use "bundle" in taxonomy term entity field queries.
Because that one was very sloppy integrated, it does not check for existence of a certain vocabulary before it access it (taxonomy.module:2048).
In combination with this module this causes PHP notices, because this module access the field settings containing the bundles for a given entity type like this:
$bundles = _entity_reference_multiple_bundles_prepare($field['settings']['target_entities_bundles'][$target_type]) entity_reference_multiple.module:412.

The problem with this is, that the array in "...['target_entities_bundles'][$target_type]" has another index before it reaches the real bundle list that is enabled for the given $target_type.
The bundle condition gets the following as a value:

array(
  'target_bundles' => array(
    'bundle_1' => 'bundle_1',
    ...
  )
)

.
This array can not be processed properly. It may somehow work for nodes, because the SelectQuery rescues it somehow, but it does for sure not work for taxonomy terms.

I created a patch to fix this. It will be in the first comment.
A quick merge is vital, because this breaks module functionality.

func0der

Comments

func0der’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1022 bytes

There you go.

func0der’s picture

StatusFileSize
new781 bytes

Updated patch, because path names where wrong.

func0der’s picture

Title: Bundle filtering does not work properly » [PATCH] Bundle filtering does not work properly

  • func0der authored 0040d13 on 7.x-2.x
    issue #2391757: [PATCH] Bundle filtering does not work properly
    
zestagio’s picture

Status: Needs review » Closed (fixed)

Hi, Thanks for you patch. Patch was applied