Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5783 closed defect (bug) (fixed)

In Message compose screen the "send to" autocomplete fails

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Messages Keywords: has-patch commit


Hi since r8559 the deprecated autocomplete scripts don't load. As a result it's not possible to choose the people we want to send a private message to.

I found it a little weird to use deprecated script in the message component, but i guess it will benefit from #3278 improvements.

So in the meantime, i'm suggesting the attached patch.

Attachments (1)

5783.patch (500 bytes) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (8)

10 years ago

#1 follow-up: @DJPaul
10 years ago

  • Keywords commit added

I decided to soft-deprecate those old autocomplete scripts recently as eventually I want to switch those over to using At.js somehow (which will probably involve UI adaptions). The AJAX lookup behind this part of the Messages component has already been switched over to use the new Suggestions API endpoint, rather than its own bespoke AJAX handler.

Moving the JS around a bit is also some groundwork that will help us significantly overhaul the quality of BuddyPress' JS in 2.2. There is a ticket somewhere I shall add my suggestions to, soon, about how we can do JS better in future release.

Patch works fine

#2 @imath
10 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 8709:

Make sure autocomplete feature is available in Message compose screen

As the autocomplete javascripts are now registered hooking 'bp_enqueue_scripts' with a priority of 1 since r8559, the function messages_add_autocomplete_js() also needs to be hooked to 'bp_enqueue_scripts' but with a later priority (default one). Previously it was hooked to 'bp_actions' which is too early for the javascripts to be registered.

Fixes #5783

#3 in reply to: ↑ 1 @imath
10 years ago

Replying to DJPaul:
Thanks a lot DJPaul for the explanations :)

#4 @tobyhawkins
10 years ago

I've tried this patch, but still can't get autocomplete to work. Not getting any javascript errors in the console (although I was getting one until I uploaded the latest version of jquery.bgiframe.js and jquery.bgiframe.min.js - 3.0.1). I've tried deactivating plugins, but no joy. Could anyone give me some pointers on how to go about debugging this one?

#5 @r-a-y
10 years ago

I've tried this patch, but still can't get autocomplete to work.

If you have the friends component enabled, you can only get autocomplete suggestions for friends.

If you want to get autocomplete suggestions for everyone regardless of friends, try adding the following to /wp-content/plugins/bp-custom.php:


#6 @tobyhawkins
10 years ago

It's not even autocompleting for friends' names.

#7 @tobyhawkins
10 years ago

Ok ignore me. Just rolled back to an earlier version of this site on my test environment and it looks like it hasn't worked for a long time. That version was running Buddypress 1.8.1 so it must be something else causing it. Taking over sites is tricky!

Note: See TracTickets for help on using tickets.