Skip to:
Content
Pages
Categories
Search
Top
Bottom

Messaging system send-to name auto-fill when friends connection is disabled

Viewing 16 replies - 1 through 16 (of 16 total)

  • joshthebeloved
    Participant

    @joshthebeloved


    Venutius
    Moderator

    @venutius

    I’m struggling to replicate your issue. In the BP Legacy template the default is friends only but adding the AUTOCOMPLETE_ALL setting opens this up to all members, this works with or without friends enabled.

    My understanding is that the Nouveau template works differently and displays all anyway, but I can confirm that with friendships turned off you can see the other site members on autocomplete.


    joshthebeloved
    Participant

    @joshthebeloved

    Hi @Venutius thank you for your reply.

    I put the below code into wp-content/plugins/bp-custom.php. I also enabled the default WP 2016 theme, and tried disabling all my plugins except BP. The autocomplete is still not showing up when friends connection is disabled.

    When I have friends connection enabled, the autocomplete works to show a list of Friends only.

    I’m not sure why this is not working. Does the AUTOCOMPLETE_ALL still work in BuddyPress 4.2?

    define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', true );


    Venutius
    Moderator

    @venutius

    Which BP Theme are you using ( Settings>>BuddyPress>>Options ) then I can be more accurate in my testing.


    joshthebeloved
    Participant

    @joshthebeloved

    @Venutius I am using BuddyPress Legacy.


    Venutius
    Moderator

    @venutius

    I just tested it again and I can confirm that it works, I tested with both Subscribers and Contributors, both got the automatic name suggestions for all site members.


    Venutius
    Moderator

    @venutius

    Are you getting any errors in the JS Console or WP-DEBUG?


    joshthebeloved
    Participant

    @joshthebeloved

    Hmmm that’s so strange.

    I’m fairly new to all this, I’m going to have to figure out how to check for these errors that you mentioned first and then I’ll get back to you.


    Venutius
    Moderator

    @venutius

    If you right click on the screen, then select Inspect, then find the console this will show you any Javascript errors. You can sit with this open while you type the name and see if anything gets reported.

    for the PHP error log you need to add the following to your wp-config.php:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);
    @ini_set('display_errors', 0);

    You can then load a plugin such as BES Error Log Viewer to view any errors recorded in this file.

    Another useful plugin is Query Monitor, which gives you dynamic reports of errors on your system.


    Venutius
    Moderator

    @venutius

    Another thing to try would be the BP Nouveau theme, this works differently for getting the autofil for user names and if it works could give some clues.


    joshthebeloved
    Participant

    @joshthebeloved

    Ok, so I can confirm that I am not getting any errors in the JS Console or in WP-DEBUG.

    But you are right about BP Nouveau. When I enable this template pack on the Twenty Sixteen theme, the auto-fill name suggestions works perfectly for all users, even with friends connection disabled. But note, it is working even without using AUTOCOMPLETE_ALL in the bp-custom.php file.

    What could this mean?

    Thank you for all the help and tips @Venutius really appreciate it.


    Venutius
    Moderator

    @venutius

    One last thing to try, it probably won’t work, but when I tested it I put the autocomplete definition in the child-themes functions.php as opposed to the bp-custom, you could try that?

    Nouveau autocomplete is different to legacy autocomplete in that it does not filter for friends only. This seems to confirm that BP is simply not seeing your autocomplete setting as you suspect.


    joshthebeloved
    Participant

    @joshthebeloved

    Sorry for the late reply.

    It isn’t working for me, sadly. I am trying this on a staging site. Could that have something to do with it? When I try to edit my functions.php file via the wordpress editor, it gives me the error: “Scrape nonce check failed. Please try again.” However, it doesn’t give me that error when making edits on my live site.

    Is there something I should be doing in addition to the autocomplete definition? I found this topic that is more recent. https://buddypress.org/support/topic/messages-send-to-auto-fill-functionality-not-working/

    Could this be something?

    – Joshua


    Venutius
    Moderator

    @venutius

    The options suggested by that post would turn off mentions altogether so I don’t think they are correct. As far as I can see that Autocomplete definition is all that you need. It certainly worked on my test system so there must be something else preventing the mentions lookup from working.


    joshthebeloved
    Participant

    @joshthebeloved

    Hi @Venutius

    Just wanted to let you know that placing

    define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', true );

    in the bp-custom.php file is working for me now! I was correct in what I suspected. The issue was that it was not working with my staging site for some odd reason. When I did the exact same thing on my live site, it started working like you said. Some how it was not reading the file or detecting file changes.

    Thanks for you help. Really glad I figured this one out.


    Venutius
    Moderator

    @venutius

    Glad you got it working, strange that it’s not working on the staging server.

Viewing 16 replies - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.
Skip to toolbar