I added a multi index of 2 entity types and I noticed the description for the bundle filter says "The following entity types do not contain any bundles: User. All items of those types will therefore be included in the index.". This is what I want - but when I actually run the index and look at the code, it's excluding all users completely. This is against what the description says as well.

I can look into creating a patch, but wanted to see if this was intended since it doesn't seem like it's correct

Comments

Derimagia created an issue. See original summary.

drunken monkey’s picture

Component: General code » Plugins
Status: Active » Needs review
StatusFileSize
new855 bytes

You're right, thanks for reporting this!
Seems I thought of this case and wrote a warning, but then forgot to take this case into account in the actual altering code.
Please see whether the attached patch fixes this for you!

Derimagia’s picture

Status: Needs review » Needs work

Sorry for the long delay - was at Drupalcon.

Patch sadly has an error with calling hasBundles - you need to pass entity_get_info($item->item_entity_type) in it instead

drunken monkey’s picture

Status: Needs work » Needs review
StatusFileSize
new592 bytes
new872 bytes

Patch sadly has an error with calling hasBundles - you need to pass entity_get_info($item->item_entity_type) in it instead

It's $item->item_type (which confused me shortly), but otherwise you're right – sorry about that, and thanks for testing!
Is this better?

guictx’s picture

Patch works for me on 7.x-1.18.

Derimagia’s picture

Status: Needs review » Reviewed & tested by the community

Good for me too

  • drunken monkey committed d07089b on 7.x-1.x
    Issue #2720465 by drunken monkey: Fixed bundle filter's handling of...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Good to hear, thanks a lot for testing!
Committed.

Status: Fixed » Closed (fixed)

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