hypeJunction / elgg_tokeninput

Tokenizing autocomplete for Elgg
12 stars 5 forks source link

Problem while using with messages #6

Closed Wouter0100 closed 8 years ago

Wouter0100 commented 8 years ago

When I enable this plugin and send a message to someone through the messages plugin, I get a message "You did not select someone to send this to.". It seems to be related to the tokenized autocomplete input.

We're using default theme shipped with Elgg 2.0.2 and the latest version of this plugin (Composer).

propertunist commented 8 years ago

i am also seeing this in elgg 2.1.2

propertunist commented 8 years ago

so i have debugged this issue and there are 3 changes that i think are necessary to get this to work with messages. am i right in thinking this wasn't tested with messages?

views/default/input/userpicker.php needs the line:

$vars['is_elgg_autocomplete'] = true;

then the issue is that the messages 'send' action expects an input called 'recipients', whereas this plugin returns one called 'members'. additionally, the messages action expects a guid and this plugin is providing a user name. after changing the action to accommodate the format of the data provided by this plugin, i got the messages plugin to send a message correctly. i also noticed that the userpicker does not exclude my own user in it's list.

hypeJunction commented 8 years ago

Hm, this was working at some point. There must have been changes to messages and/or autocomplete. I will check