Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'questions'

Viewing 25 results - 1,251 through 1,275 (of 2,115 total)
  • Author
    Search Results
  • #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!

    #104485
    xXDarkie
    Member

    Bump. Sorry don’t want to be annoying, but it’s pretty important and I’m in a hurry.

    #104374
    aljuk
    Member

    Hi, I should preface this by saying that I’m not a BuddyPress developer as such, but have been coding WordPress themes professionally for a couple of years, and have been researching BP and putting together a BP-based startup for the past couple of months, so have been through these questions myself, and my own early steps may prove useful.

    1. See https://wordpress.org/extend/plugins/bp-profile-privacy/

    2. https://wordpress.org/extend/plugins/buddypress-private-community/ might be interesting. There’s another, more granular, privacy plugin that the community has its fingers crossed for, for further details see http://bp-privacy.com/

    3. All of that should, and does, happen as a matter of course.

    4. Semantics aside, they are all “subscribers” as far as WP is concerned, ie. members and commenters are one and the same.

    5. BuddyPress themes contain extra template files for the parts of BP that are an extension on the WP template system (eg. activity, groups, user profile etc.) plus various css and javascript files. Running a regular WP theme with BP running won’t give you the framework to display that BP functionality. In order to achieve that, your WP theme needs the extra template files. You have two options, each with benefits and drawbacks:

    a) Extend your existing theme with the required template files, javascript and css to enable and display the BuddyPress sections and functionalities. See https://wordpress.org/extend/plugins/bp-template-pack/ The drawback is that next time BuddyPress is updated, you might be faced with quite a fair amount of development getting your site aligned with the latest code base, new features etc.

    b) Constructing a child theme. This relies on running the Default theme, and then adding your own css overrides and theme hacks as a non-destructive layer on top. The principle is that you can strip away your own additions, and you’ve still got the Default theme running beneath it, so in a sense it’s “unbreakable” and whilst you may need to modify your additions once BP is next updated, the underlying template will always function. With a decent caching strategy, unless you’ve expert level php behind you, I think it’s the way to go.

    #104372

    In reply to: Register and login

    Hugo Ashmore
    Participant

    Why have you posted on the back of a another thread? Did nothing in what I mentioned above about asking detailed questions, supplying a little bit of background information on your situation / setup make sense?

    Please do as is expected, if you really need help, post a new thread rather than piggy back of another only possibly related post, supply detail so that we do not have to start of by asking you questions that shouldn’t be necessary.

    Closing this thread.

    #104366
    Hugo Ashmore
    Participant

    Locking topic, too many old posts on this forum get resurrected, not generally an accepted practice on boards.

    @n_sane a little advise if you really want help you must formulate a detailed question which describes the issue and any attempts at rectifying it, along with your setup in terms of app versions and server, simply stating there’s an issue will not get very far as we have to start asking you a whole series of questions just to get that detail from you, ergo much of our volunteered free time wasted.

    #104039

    In reply to: Change Groups to Teams

    Hugo Ashmore
    Participant

    Yes, have a read through the Codex documentation, then if any questions post back to this thread.

    #104034
    Hugo Ashmore
    Participant

    @residentcusano I have closed the other two threads, please take heed of my comments in one of them and also of modemloopers above.

    There is a right way and a wrong way to ask questions on tech forums the RFC on the subject is this link below, it might pay to give it a little glance over.

    http://www.catb.org/~esr/faqs/smart-questions.html

    #104032
    Hugo Ashmore
    Participant

    What does it say in the readme text, what does the authors homepage say? buddypress.org is a support forum for matters directly related to BP and it’s default theme and plugins that are specific to it.

    Someone here may know of this plugin but in general you should ask these questions of the plugin author and/or study the installation guides.

    #104030
    akle
    Member

    Great! Couple follow-up questions:

    1. If admin creates a post (a general website post, not specific to a user or group), would these images go to the same database or will I have two separate media database?

    2. if a user wants to add an image that would be associated with a post that was created by the admin on the back end (i.e. it is not a they did in their group or profile), would they be able to do that?

    #104020

    In reply to: Group avatar size.

    Hugo Ashmore
    Participant

    @ residentcusano can you please not simply jump around posts with the same question, you have asked this in another post , once only is the golden rule, please also could you start to actually ask questions in a detailed and considered manner rather than simply barking out requests that are somewhat vague it’s up to you to make things as clear as possible so that people can help you effectively.

    Closing this thread.

    #102984
    EBOC
    Participant

    Hello Buddypress, can someone that has fixed this issue please post the solution? Seems like the forum is scattered with questions about this problem.

    #102896
    imjscn
    Participant

    @DJPaul
    Thanks for response!
    I am making a Questions and Answers forum, so, it’ neccesary to address who asked the question. Would you point some clue on how to create a new function to get the starter’s username?

    #102837
    jclaflin
    Member

    This also is a problem for me as well. My client has no way of knowing when new questions are posted and does not have the ability to send emails to the entire group, please advise. Thanks

    #102802

    In reply to: forum does not work

    joelgomez
    Member

    Dear hlna,

    In most of the support forums I participate people is encouraged to do exactly the opposite, because you could end having too many people asking the same questions. I think its better that people that had the same problem read the same suggestions to solve them.

    BUT if you are the moderator and those are the rules, I respect them. Should I create a new topic to ask the same question and receive the same answers?

    Regards,
    Joel

    #102783

    In reply to: forum does not work

    Hugo Ashmore
    Participant

    With my moderators hat on: Can I please remind people that on tech forums it is frowned upon to hijack threads i.e have two or more people asking questions within the one topic, this is due to threads rapidly becoming confused, my question was directed at ? one person but another replied in answer to it, this thread and it’s responses belong to the original OP or at least are meant to.

    #102746
    Sven Lehnert
    Participant

    Hi eredepe, this bug doesn’t make sense for me. Please activate a different theme, and then reactivate the custom community theme.

    If the error still occurs, I will need to check it, and try to reproduce it.

    For Support around Custom Community, please use the forum on themkraft.com
    I guess you will find most questions already answered over there.

    http://themekraft.com/forums/

Viewing 25 results - 1,251 through 1,275 (of 2,115 total)
Skip to toolbar