Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'questions'

Viewing 25 results - 1,351 through 1,375 (of 2,230 total)
  • Author
    Search Results
  • #104700
    Boone Gorges
    Keymaster

    Sorry we couldn’t be of more help. I am really perplexed about your situation. There must be a conflict with something else in your setup, as I have never heard of this kind of problem before. If you ever feel like sharing the code you wrote to replace it, feel free.

    #104696
    xXDarkie
    Member

    I’ve rewritten all the code for friends and messages myself. Thanks anyway for the support.

    #104683
    xXDarkie
    Member

    I’ve discovered that if I access the page outside the scope of buddypress and wordpress (that is, accessing to the direct link without passing by my website) the thing returns a correct result for the friends (if I hardcode the input of course).
    What could this mean? I require_once in my index wp-config.php and also in my friend_page (which is loaded on top of the index, in a slider that comes down). Is there a problem with this approach?

    #104674

    mercime, thanks much for that.

    #104650

    In reply to: Admin bar not showing

    @mercime
    Participant

    — This exact same problem has been asked before of this theme on this forum in fact mercime you responded on it. —

    Thanks, I know I’ve answered a lot of questions about it @hnla :-)

    #104580
    xXDarkie
    Member

    I’ve reinstalled BP and WP… the error remains but now it does find methods for sending messages.
    There is a bug in the get_inbox_count method if you want to know.

    ( !$unread_counts = $wpdb->get_results($sql) )
    return false;

    This line in my case had an error, even though the result existed, it entered inside the if and returned nothing as result, while the query existed, the get_results returns an (empty) array. I commented it out and now it works.

    But the friends error remains as is. Any ideas?

    #104579
    @mercime
    Participant

    Most BuddyPress plugins are available at WordPress plugin repository
    https://wordpress.org/extend/plugins/buddypress-real-names/

    #104578

    Regarding my last comment on my question #3, I was browsing the BuddyPress plugins list and found this but unfortunately, the link (https://buddypress.org/community/groups/buddypress-real-names/) goes to a different plugin’s page.:

    BuddyPress Real Names
    BuddyPress Real Names is a BuddyPress plugin that use two different fields (one for the last name and one for the first name) to display the Full Name instead of the regular name field. If you have already a community with members; you can use it to replace all the old names with Full Names. […] ..

    #104574

    aljuk, thanks for the reply.

    1. I think the BP Profile Privacy plugin is just what I need.

    2. I’m not sure about the BuddyPress Private Community plugin. I think I’ll have to install it and play with it and see if it’s helpful for me..

    3. When you say “All of that should, and does, happen as a matter of course”, *Name* is a core field but doesn’t break a user’s name down into first name, middle initial and last name. So in order for me to have that level of granularity for the user name, I’ll have to add a “First Name” field, a “Middle Initial” field and a “Last Name” field. So I end up asking the user to fill in their name information twice and the value the user enters into the “Name” might not match the combined values of the “First Name” field, “Middle Initial” field and “Last Name” fields. I’d much rather have the user enter values in those fields then concatenate those entries to fill the “Name” field.

    4. So is there a way I can manage group members profile management separately from visitor management? If I set up the BP profile fields with the level of granularity I need for our members, that would be way too much information to ask a visitor to enter just to be able to register to leave comments.

    5. Sounds to me like until I can heap enough abuse on the folks over at Artisteer, I’ll have to retweak theme files every time I make a change to the theme with Artisteer. Your suggestion of constructing a child theme sounds like it would work but I’d have to have my “real” theme become a child theme to the BuddyPress default theme and that seems to me to be the exact opposite of how things ought to work. It would be really nice if there was some way to install the BuddyPress default theme as a limited child theme to my Artisteer theme without overriding my Artisteer theme formatting. That does bring up a question though… is there any way I can create page templates for profile management that use the BuddyPress default theme yet have the rest of the site maintain use of the Artisteer theme? Another option might be putting up profile management on a separate domain and synchronizing the database from there to the main site’s database. However, this sounds like a level of development that’s probably above my skill level (I’m not a PHP programmer but am at least a fair HTML guy).

    Again, thanks much for your help.

    #104573
    xXDarkie
    Member

    Bump! It’s really of extreme importance.
    Moreover I figured out also that messages don’t work either: actually if I try to call a function defined in bp-messages-classes.php it says it doesn’t exist… while for friends the methods are found by the compiler this doesn’t happen for the messages… I’ve checked on the admin board and the messages are enabled (I also have the tables in my database to handle messages).

    May the problem with friends be related with this one?

    #104569
    @mercime
    Participant

    @gunju2221 smile, be cool :-)
    On the other side of the aisle, I’ve helped out others who asked BP questions in WP.org forums or referred them to our forums here

    #104543

    In reply to: My 2 Cents

    Boris
    Participant

    @alanchrishughes
    I guess I understand where you’re coming from, but from a programmers point of view, BP is a great programme to work with cause it’s so customizable (of course there’s always room for improvement). Maybe not so much from a designers point of view. Not so sure it should be either. Too many options tend to make programmes too clunky. Just means that maybe you should look into working together with someone who knows his way round php (WP) code well.

    And to be honest, it’s not that bad once you got your head round it. Just give it another go. Ask questions here and people will help you…

    #104524
    xXDarkie
    Member

    Anyhow since I set manually the friendship I tried to call another function (the one that counts the number of friends you have) and also that one returns 0. This is truly unbelievable.

    #104523
    xXDarkie
    Member

    Again I used your code and the result is:
    SELECT id, is_confirmed FROM wp_bp_friends WHERE (initiator_user_id = ” AND friend_user_id = ”) OR (initiator_user_id = ” AND friend_user_id = ”)
    Which is normal I guess, because the passed variables are integers, right?

    #104519
    Boone Gorges
    Keymaster

    I doubt it’s a problem with prepare() itself, since that method is used on nearly every query in BuddyPress and I have never heard of this problem before.

    It could be the case that $loggedin_userid and $possible_friend_userid are improperly cast. Try switching %d with %s in check_is_friend() and see what happens.

    #104517
    xXDarkie
    Member

    I’m using the BP function.
    It is the former indeed, and I managed to trace the input down to $wpdb->query (if avoid using prepare) or to prepare, to see that it doesn’t work (with prepare the $args = func_get_args() gets nothing as parameter even though I checked they are correct the second is wrong in that line I posted above).

    Anyhow here is the result:
    SELECT id, is_confirmed FROM wp_bp_friends WHERE (initiator_user_id = 0 AND friend_user_id = 0) OR (initiator_user_id = 0 AND friend_user_id = 0)
    This is what I get printed out. If I inspect the values $loggedin_userid, $possible_friend_userid, $possible_friend_userid, $loggedin_userid they have the correct values.
    In prepare the problem is this line “$args = func_get_args();” that gets wrongly the parameters (inspecting args returns nothing).

    #104516
    Boone Gorges
    Keymaster

    I realize that the query is with 0s. That is the problem. I am suggesting that even though you are “sure 100%” that you are passing the correct IDs to the function, the way that you are concatenating the query string might be corrupting it.

    In any case, I am confused about what’s actually failing here. Are you using the function BP_Friends_Friendship::check_is_friend(), or are you writing your own function? If the former, change the `$result = ` line to the following
    `$query = $wpdb->prepare( “SELECT id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id = %d) OR (initiator_user_id = %d AND friend_user_id = %d)”, $loggedin_userid, $possible_friend_userid, $possible_friend_userid, $loggedin_userid );
    print_r( $query );
    $result = $wpdb->get_results( $query );`
    so that you can see if the query is being put together correctly. If not, dump the contents of $loggedin_userid and $possible_friend_userid just before these lines to see if you are, in fact, passing values to the function.

    #104508
    xXDarkie
    Member

    I’ve done all the inspection I could, I discovered that
    1) the prepare function when doing func_get_args (or whatever is the name) it gets NOTHING as result, so the query is indeed with ids 0s. Didn’t do what you said, Boone Gorges, even though I really thank you for your concern, I think I would have arrived to the same result :).
    2) if I avoid calling prepare and feed the query directly to $wpdb->get_results (I’m always in check_is_friend function of buddypress) when it does $this->result = @mysql_query( $query, $dbh ); the result is NOTHING. No idea why, because $query just before this function call is the correct query with the correct IDs.

    Any ideas?

    #104503
    Boone Gorges
    Keymaster

    If the last query reads 0s where there should be valid ids, you are probably not constructing the query correctly. Are you using $wpdb->prepare, with sprintf syntax?
    `$query = $wpdb->prepare( ‘SELECT id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id = %d) OR (initiator_user_id = %d AND friend_user_id = %d)’, $initiator_user_id, $friend_user_id, $initiator_user_id, $friend_user_id );`

    (I’m not sure if this is your exact query, but you get the idea.)

    If it still isn’t working, then as an experiment, try passing the prepare() arguments as strings – replace %d with %s in the replacement patterns.

    I suggest you dump your variables/query string just before AND just after the query is constructed in this manner, to see whether prepare() is causing the problem.

    #104501
    xXDarkie
    Member

    I don’t think the problem is the number of queries actually…
    I did a print_r over the $wpdb and the last query done after my call to friends_check_friendship_status is
    SELECT id, is_confirmed FROM wp_bp_friends WHERE (initiator_user_id = 0 AND friend_user_id = 0) OR (initiator_user_id = 0 AND friend_user_id = 0)
    Which is pretty strange since I am SURE 100% I pass some real ids to the function.
    Any ideas?

    #104493
    xXDarkie
    Member

    Ok I just sent them an e-mail, thanks.
    What could be the “relevant things” in the log file that may arise? Do you think that they are “lowering” the number of allowed queries per second and this may be the issue for which the functions are not returning the proper result?

    #104492
    Paul Wong-Gibbs
    Keymaster

    Ask them if they see anything relevant in the log file or from any usage stats they might record.

    #104489
    xXDarkie
    Member

    Thanks a lot for the reply!
    It’s not indeed my own server, I’m working on someone else’s. What should exactly ask them? To allow a greater number of active connections?
    Thanks!

    #104487
    Paul Wong-Gibbs
    Keymaster

    BuddyPress’ SQL is fine. Your SQL server might be dropping connections. Is this on your own server, or is it being hosted by someone? I’d suggest that you ask them to check your SQL database and look at the number of active connections allowed. Something must be a little bit off-kilter somewhere, or they are throttling database queries.

    #104486
    xXDarkie
    Member

    I’ve just realized I have a couple of warnings from WordPress, don’t know if this can be helpful to help me out:

    Warning: mysql_real_escape_string(): 11 is not a valid MySQL-Link resource in /path/to/wp-includes/wp-db.php on line 785
    Warning: mysql_error(): 11 is not a valid MySQL-Link resource in /path/to/wp-includes/wp-db.php on line 1119

    These happens only when calling the above stated functions of BuddyPress.
    Thanks!

Viewing 25 results - 1,351 through 1,375 (of 2,230 total)
Skip to toolbar