Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp-messages Compose Message autocomplete issue

  • @wansinn

    Participant

    I have an Issue with the Autocomplete Function of bp-messages:

    The AJAX Function always puts in rows with crap content into the autocomplete list, when it doesn’t find real users:
    – As 10 is the Max Number of Users showd it always generates 10 Rows
    – If it finds Users, it fills the first rows with the users
    – the rest is filled with the first rows of the html body! why this?!

    the generated Autocomplete div looks like this (with one actual found member):
    <div style="display: block; position: absolute; width: 275px; top: 519.8px; left: 225.5px;" class="ac_results">
    <ul style="max-height: 250px; overflow: auto;">
    <li class="ac_event"><img width="15" height="15" class="avatar user-4-avatar" alt="Avatar Bild" src="http://www.gravatar.com/avatar/2d4295744122a2d5c31fde29b569409a?d=http://www.entrepreneurship.de/campus/wp-content/plugins/buddypress/bp-core/images/mystery-man.jpg&s=15"&gt; <strong>Ch</strong>ristian Fenner (<strong>ch</strong>ristianfenner)</li>
    <li class="ac_odd"></li>
    <li class="ac_event"></li>
    <li class="ac_odd ac_over"></li>
    <li class="ac_event"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"></li>
    <li class="ac_odd"><title>Entrepreneurship Campus | Administrator | Messages</title></li>
    <li class="ac_event"><meta content="WordPress 3.0.1" name="generator"> <!– leave this for stats –></li>
    <li class="ac_odd"><link media="screen" type="text/css" href="http://www.entrepreneurship.de/campus/wp-content/themes/campus/style.css&quot; rel="stylesheet"></li>
    <li class="ac_event"><link campus="" title="Entrepreneurship" type="application/rss+xml" rel="alternate"></li>
    <li class="ac_odd"><link campus="" title="Entrepreneurship" type="application/rss+xml" rel="alternate"></li>
    </ul>
    </div>

    you can look it yourself at http://www.entrepreneurship.de/campus but the site is in german…

    the fun thing is, that, on another install, which is the development state of the website and very similar, but not same, the function works without the mentioned bug.

    Main differences of the installs:
    – Dev: Multisite WP3.01 Install, the Buddypress is installed in a “user blog”, Live: Single Site WP 3.01 install
    – Different Servers / Server Configurations

    Installation Details of the Systems:
    – WP 3.01, BP 1.2.6
    – Buddypress childtheme with almost all template files changed because of theme translation (but the theme is the same on both installs and also i tried to use standard theme which didn’t help)
    – Several Plug-Ins installed (But I deactivated all Plug Ins which didn’t solve the problem)

    I already tried to see myself through tje ajax functions of the autocomplete but i didn’t find anything that gave me a hint how to solve the problem…

    would be great if you came up with an idea how to solve this problem. if you need more information about the installation details, tell me!

    cheers, oli

Viewing 14 replies - 1 through 14 (of 14 total)
  • @romanriebow

    Participant

    similar problem over here, autocomplete function finds valid users and shows them up, but in the following lines an error is displayed 3 times:

    “Warning: Cannot modify header information – headers already sent by (output started at mountpointwp-contentpluginsbuddypressbp-themesbp-default_incajax.php:556 in mountpointwp-contentpluginsbuddypressbp-messages.php on line 556”

    any idea?

    by the way, is there a plugin which enables a better useabbility for choosing multiple user’s to send a private message to? Something like a list with checkboxes for example?

    @donpejote

    Participant

    exactly the same problem here.

    @carolineelisa

    Participant

    Hi guys, I am having the same problem.

    Found this but I think as it’s for an older version of Buddypress I can’t get it to work for me.

    Perhaps it will help someone a little more code-savvy?

    @gunju2221

    Participant

    please list all buddypress related plugins first.

    @herostrat

    Member

    not to code-savvy but what fixed it for me:

    bp-messages-cssjs.php:

    `jQuery(“ul.first”).autoCompletefb({urlLookup:’root_domain . str_replace( ‘index.php’, ‘/wp-load.php’, $_SERVER ) ?>’});`

    pulled the wrong path to wp-load.php for my single site wp subdomain installation. Like http://DOMAIN/SUBDOMAIN/SUBDOMAIN//wp-load.php

    Replacing it with the commented line fixed it for me:

    `jQuery(ul.first).autoCompletefb({urlLookup:’root_domain . ‘/wp-load.php’ ?>’});`

    I’ll file a proper bug report later.

    @carolineelisa

    Participant

    WordPress 3.0.3
    BuddyPress 1.2.6
    BP Group Documents 0.3.5

    Plus a custom functions.php file which makes the autocomplete pick up all members not just friends, but this bug was happening before I created this file.

    @herostrat

    Member

    sry, missed the “”, correct code is:

    `jQuery(“ul.first”).autoCompletefb({urlLookup:’root_domain . ‘/wp-load.php’ ?>’});`

    @carolineelisa

    Participant

    Amazing @herostrat, thank you. I appreciate your (relative) code-savviness!

    @r-a-y

    Keymaster

    Thanks for the fix, @herostrat.

    I’ve posted a patch for issue on the BP Trac:
    https://trac.buddypress.org/ticket/2556

    Thanks again!

    @abimelex

    Member

    thanks this works beautifull!

    @rahuldev-1

    Member

    Yes there is a better solution to this problem i am code savvy and i have myself invented this solution
    Step:1:
    The solution is copy the content all content of file wp-load.php which you will find in the root of wordpress installation directory root directory. Then create a new file rahuldev.php paste all the code in wp-load.php to rahuldev.php file plus at the end of that rahuldev.php file add this small code as below
    <?php
    $resultrah = mysql_query(“select user_login, user_nicename from wb_users where user_login like ‘%”.$_POST.”%’ or user_nicename like ‘%”.$_POST.”%'”);
    while($row = mysql_fetch_array($resultrah))
    {
    ?>

    <?php
    }
    ?>

    make sure the name of the table if it is not default set during installation then that should be the name of the table as the name is in your installation
    once the above code is added to the bottom of the new file then save the new file to the root of your wordpress application ie where there is wp-load.php there along with it should be our new file rahuldev.php

    Step:2:
    Open wp-content/plugins/buddypress/bp-messages/bp-messages-cssjs.php file

    replace
    var acfb =
    jQuery(“ul.first”).autoCompletefb({urlLookup:’root_domain . str_replace( ‘index.php’, ‘/wp-load.php’, $_SERVER ) ?>’});
    with
    var acfb =
    jQuery(“ul.first”).autoCompletefb({urlLookup:’root_domain . ‘/rahuldev.php’ ?>’});

    And now enjoy my magic

    Take care

    @rahuldev-1

    Member

    Yes there is a better solution to this problem i am code savvy and i have myself invented this solution
    Step:1:
    The solution is copy the content all content of file wp-load.php which you will find in the root of wordpress installation directory root directory. Then create a new file rahuldev.php paste all the code in wp-load.php to rahuldev.php file plus at the end of that rahuldev.php file add this small code as below
    ?php
    $resultrah = mysql_query(“select user_login, user_nicename from wb_users where user_login like ‘%”.$_POST.”%’ or user_nicename like ‘%”.$_POST.”%'”);
    while($row = mysql_fetch_array($resultrah))
    {
    ?>
    ?php echo $row;?>

    ?php
    }
    ?>
    replace ?php with <? php
    make sure the name of the table if it is not default set during installation then that should be the name of the table as the name is in your installation
    once the above code is added to the bottom of the new file then save the new file to the root of your wordpress application ie where there is wp-load.php there along with it should be our new file rahuldev.php

    Step:2:
    Open wp-content/plugins/buddypress/bp-messages/bp-messages-cssjs.php file

    replace
    var acfb =
    jQuery(“ul.first”).autoCompletefb({urlLookup:’root_domain . str_replace( ‘index.php’, ‘/wp-load.php’, $_SERVER ) ?>’});
    with
    var acfb =
    jQuery(“ul.first”).autoCompletefb({urlLookup:’root_domain . ‘/rahuldev.php’ ?>’});

    And now enjoy my magic

    Thanks
    Take care

    @alkas

    Participant

    I have do all above changes but auto complete functionality not working.
    I am very tired .
    I have also added below code
    <input type=”text” autocomplete=”on” id=”send-to-input” class=”send-to-input” name=”send-to-input”>
    but this functionality not working.

    Please suggest any other idea regarding this ASAP.

    Thanks

    @alkas

    Participant

    Hello,

    Any idea how i resolve buddy press auto complete functionality issue.?

    This functionality not working.

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘bp-messages Compose Message autocomplete issue’ is closed to new replies.
Skip to toolbar