Problem/Motivation
The entity reference field when trying to add items to an entityqueue does not return any select options on an entityqueue that has been configured to accept an entity type of User and the bundles option is restricted to User.
The bug is not present when the entity type has been set to User and no bundles have been selected.
Proposed resolution
- Add a fix so that when the target bundles is set to user, the entity reference will still return results
- Remove the target bundles option altogether when the entity type is already set to user (unless there are other modules/etc which could affect the bundle types available?)
Export code - when bug is present
$queue = new EntityQueue();
$queue->disabled = FALSE; /* Edit this to true to make a default queue disabled initially */
$queue->api_version = 1;
$queue->name = 'homepage_users';
$queue->label = 'Homepage users';
$queue->language = 'en';
$queue->handler = 'simple';
$queue->target_type = 'user';
$queue->settings = array(
'target_bundles' => array(
'user' => 'user',
),
'min_size' => '0',
'max_size' => '0',
'act_as_queue' => 1,
);
Export code - when bug is not present
$queue = new EntityQueue();
$queue->disabled = FALSE; /* Edit this to true to make a default queue disabled initially */
$queue->api_version = 1;
$queue->name = 'homepage_users';
$queue->label = 'Homepage users';
$queue->language = 'en';
$queue->handler = 'simple';
$queue->target_type = 'user';
$queue->settings = array(
'target_bundles' => array(),
'min_size' => '0',
'max_size' => '0',
'act_as_queue' => 1,
);
Comments
Comment #1
Luke Parry commentedComment #2
jojonaloha commentedI added the first one that is supposed to have the bug into one of my modules, however I wasn't able to reproduce the issue that was described. I tested using both Entityqueue 7.x-1.0-alpha3 and with the latest dev. Also tested with and without the User bundle checkbox checked.
Can you provide more info? What modules/versions are you using? Does the issue only happen for users with or without certain permissions?
Comment #3
pjbarry21 commentedI ran into the same issue with dev from Mar 2, 2015. Thanks for posting as I couldn't figure out what I'd done wrong when it didn't work, initially (first time using this module).
I have 247 modules installed, so unsure what it could be conflicting with. I do have organic groups installed. I'm in Drupal 7.35.
Same issue -- the autocomplete acts as though the user is not found when "user" is selected as the bundle (like it was searching the wrong entity type). User was the only bundle option available (because I told it I wanted to select from users as the type). When I de-selected "user" it worked as expected (autocomplete immediately found the users as I typed). Same issue happened if it was a queue or a subqueue. All types of users/roles.
Let me know if there's more I can share that might help.
Comment #4
jojonaloha commentedThanks for the additional info. I'll try to reproduce it with OG and report back when I get a chance.
Comment #5
jojonaloha commentedI've re-tested this and still cannot reproduce using:
I did encounter a javascript error causing autocomplete not to work for either queue when using these versions and switching Entityqueue to 7.x-1.0-alpha3.
Comment #6
jive01 commentedThis just happened to me. The dropdown does not show up when you have the user entity checked as a bundle. Unchecking it fixes the issue. #3 resolved the problem, but this should be fixed.
Comment #7
amateescu commentedClosing out old issues.