Skip to:
Content
Pages
Categories
Search
Top
Bottom

Why is integration so troublesome?


  • Anonymous

    I’m not meaning to be rude or anything but I’m struggling to understand why two bits of software made by the same company are so hard to integrate? I’ve never managed to get integration working fully and I always get to the point where users who registered through the forum post on the WordPress blog show up as Anonymous… which basically renders the whole process pointless. I’ve managed to get WordPress and vBulletin to integrate seamlessly, but not bbPress.

    bbPress and WordPress are both great pieces of software in their own right, but when it comes to integration with each other they are pretty weak. For example, the new bbPress isn’t compatible with WordPress 2.6 because of an issue with cookie management in WordPress… for the integration to work we now have to wait for bbPress to release an update which according to a moderator on here will be a while away.

    There are also so many unsolved integration threads here that it’s very difficult to find any one collection of possible solutions. I appreciate the amount of work that goes into this kind of software and time required to provide support. I’m just feeling a bit frustrated :(

Viewing 25 replies - 1 through 25 (of 26 total)

  • Anonymous

    From what I can tell the anonymous issue is because users that register through bbPress get added to the wp_users table but the display_name field is left empty. Where do I change the query to put the user_nicename into the display_name on registration, like WordPress does? I’m not sure why bbPress doesn’t do this automatically.


    _ck_
    Participant

    @_ck_

    If you are getting anonymous users, I suspect you haven’t setup integration properly and they are not sharing the same user table.

    As far as your other observations (and I felt he same way in the beginning too) you have to realize that (easy) integration was only a priority starting with 0.9

    (you can see how complicated the process used to be under 0.8 here – note most of that is not needed now)

    Until 0.9, bbPress was just something that ran wordpress.org for Matt and there was no attitude to make integration work. There were tons of problems with usernames etc. and all integration had to be done manually with lots of plugins to fix things.

    Then attitudes changed when Matt got funding and decided to use the bbPress code to power TalkPress (essentially forums for users on WordPress.com) Sam and MDA have done a great deal of work to make integration work better but it definitely has a way to go (and should become painless and super-easy IMHO).

    So 0.9 has made integration easier but keep in mind bbPress is not even 1.0 yet, so officially it’s not even a released product. The radical cookie changes in 2.6 will take awhile for bbPress to catchup, it’s always been that way.

    ps. if it’s not obvious, I am in no way officially associated with Automattic/WordPress/bbPress. Just a plugin developer. And I am not paid. My opinions are definitely just my own and not any kind of official statement.


    Anonymous

    Well I fixed it, if anyone (incl. developers) are interested. Unfortunately it requires modifying a line of core application code…

    pluggable.php in bb-includes

    Line 502

    $bbdb->insert( $bbdb->users,

    compact( ‘user_login’, ‘user_pass’, ‘user_nicename’, ‘user_email’, ‘user_url’, ‘user_registered’ )

    );

    Replace with

    // bbPress / WordPress bug fix added display name to wordpress

    $display_name = $user_login;

    $bbdb->insert( $bbdb->users,

    compact( ‘user_login’, ‘user_pass’, ‘user_nicename’, ‘user_email’, ‘user_url’, ‘user_registered’, ‘display_name’ )

    );


    Anonymous

    Sorry, didn’t see you post there _ck_. I appreciate the work and effort you guys are putting into things. I’ve used bbPress successfully in the past… see http://www.foronemoreday.co.uk/ which runs a bbPress backend.

    Also I’ll take another look at my integration settings but i’ve been through it a lot already trying to get it to work today.

    Cheers again!

    KJ


    _ck_
    Participant

    @_ck_

    If you are changing a function in pluggable.php, the good news is you do not have to change the core. Just copy the function to a new plugin and edit it there. The plugin will load before “pluggable.php” and superceed the core function. No core edits required.

    Glad you got it working but I really dislike “display names” and I think it’s the worst concept in WordPress. Very bad idea to allow users to spoof other names. Even the “impostercide” plugin doesn’t solve all the issues. No other blog/forum system has such a quirky concept.

    BTW make sure you do NOT use the “Display Name” plugin for bbPress. It has a great deal of issues with other plugins and causes some weird behavior.


    Anonymous

    Thanks for the advice _ck_. i’ll attempt to make a plugin for this fix. Yeah, it seems kind of strange that their are 4 different fields being used to identify users and is an obvious security issue when it comes to social engineering.


    Detective
    Member

    @detective

    “Glad you got it working but I really dislike “display names” and I think it’s the worst concept in WordPress. Very bad idea to allow users to spoof other names. Even the “impostercide” plugin doesn’t solve all the issues. No other blog/forum system has such a quirky concept.”

    I think the same. In a forum it doesn’t make much sense. What if i want to send a private message to a user ? If he changes his display name and avatar it could be very hard to find who he really is. It shouldn’t be allowed in a forum with a lot of users, it could get extremely chaotic.

    Does the fix apply to comments made on WordPress before the fix is implemented or does it start after?


    _ck_
    Participant

    @_ck_

    It only affects posts made afterwards, not existing posts but some easy php/mysql code could fix existing posts.

    But I could have sworn this was fixed in bbPress 0.9 with the WordPress Integration section built in. It should give the users a WordPress role and display name. Actually, WordPress should create the display name itself if it sees a user name without a display name. I wonder if this is a WP 2.6 issue which should not be used with bbPress 0.9

    I couldn’t tell you, but I am using bbPress 0.9.0.2 and WordPress 2.5.1.

    I am going to update to 2.6 and see how it goes…

    With 2.6 I still have anonymous names =(


    _ck_
    Participant

    @_ck_

    Well we know what causes “anonymous” to show up, it’s because bbPress is not creating the display name for the user when the user registers on the bbPress side and then goes to use WordPress.

    The question is, why is this suddenly happening when bbPress is supposed to create it already. This might be a question for Sam – but I hope he can reproduce the problem.

    Did you add the above code to insert the display name?

    I hope I didn’t lead you wrong by implying you should try 2.6 because that will be incompatible with bbPress 0.9

    2.6 has compatibility with bbPress 1.0 alpha but a few plugins won’t work with the alpha yet (like bb-topic-views)

    Oh and the display name persists in 1.0 alpha and is on line 487 in pluggable. I’ve filed a trac report:

    http://trac.bbpress.org/ticket/922


    _ck_
    Participant

    @_ck_

    I guess I can create some code to fix the display name issue in existing databases. Give me a few minutes.

    update: actually it’s as simple as this in phpMyAdmin:

    UPDATE wp_users SET display_name=user_login WHERE display_name=''

    or via a mini-plugin:

    <?php
    /*
    Plugin Name: Fix Anonymous Members
    */
    function fix_anonymous() {global $bbdb;
    $bbdb->query("UPDATE $bbdb->users SET display_name=user_login WHERE display_name='' ");
    } add_action('bb_init','fix_anonymous');
    ?>

    save as _fix-anonymous.php (with leading underscore)

    you only need to upload and run bbpress once with it loaded (no activation required) and then delete the plugin or it will slow down bbPress.

    I am now writing a WordPress plugin to fix this without having to duplicate all the names in the table which is a horrendous waste of space.


    _ck_
    Participant

    @_ck_

    This plugin is meant as a temporarily workaround until the bug can be fixed in WordPress – it will replace “anonymous” with the user login.

    Install it on the WordPress side:

    <?php
    /*
    Plugin Name: changes anonymous to member's login if display name missing (plugin for WordPress)
    */
    function no_anonymous_members($author) { // this is a WORDPRESS plugin, not bbPress
    global $comment;
    if (empty($comment->comment_author) && !empty($comment->user_id)) {$user=get_userdata($comment->user_id); $author=$user->user_login;}
    return $author;
    } add_filter('get_comment_author', 'no_anonymous_members');

    if ( !function_exists('get_userdata') ) :
    function get_userdata( $user_id ) {
    global $wpdb;

    $user_id = absint($user_id);
    if ( $user_id == 0 )
    return false;

    $user = wp_cache_get($user_id, 'users');

    if ( $user ) {
    if (empty($user->display_name)) {$user->display_name=$user->user_login;}
    return $user;
    }
    if ( !$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id)) ) {
    return false;
    }
    _fill_user($user);
    if (empty($user->display_name)) {$user->display_name=$user->user_login;}
    return $user;
    }
    endif;
    ?>

    (The real answer of course is to insert the user_login when the comment is posted, however I cannot find a suitable hook in WordPress’s comment-template.php so I am doing it by completely replacing the get_userdata function in pluggable.php)


    abdessamad idrissi
    Participant

    @abdessamad-idrissi

    I run in the same proble as I installed bbpress prior to wordpress, so i created a plugin to handel the transaction:

    http://bbpress.org/plugins/topic/bb-to-wp-users-copier/

    hope it helps.


    kannued
    Participant

    @kannued

    This change to anonymous still occurs when integrating bbpress2.2 in wp 3.4.2. The plugin by bb-to-wp-users-copier is a 404. This problem existed over 4 years ago. Do I have to go into to change the display name for every user manually in the database? That doesn’t sound right.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    If there’s missing user data, then the fallback is to Anonymous. The only way there’s missing data is if that user information was deleted or manually altered, directly in the database. In that circumstance, bbPress has no other place to look for user information.


    kannued
    Participant

    @kannued

    With that info John, I went into the Users, and deleted all the imports, moving all links and posts to the normal user. That should have helped but didn’t change the anonymous problem. Perhaps it was the integration method I used which was ImportForums.

    I also noticed that occassional user appears in a topic but he is not the original poster. This problem probably originated with ImportForums.

    I am quite willing to reset everything, and import again. But I need to do something different. BBConverter doesn’t work. Any other ideas?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    If users show up as anonymous, and post_author’s are incorrect, then something was wrong with the migration script. You can try the Importer that comes with bbPress 2.2, but I’m not sure what “ImportForums” is to be much more helpful.


    kannued
    Participant

    @kannued

    ImportForums is/was bbpress 2.1.2 You go to Tools, Forums, and tab ImportForums to do the migration. The original conversion was completed using bbpress 2.1.2 and the previous just prior to WP 3.4.2. But I have upgraded to bbpress 2.2 and wp 3.4.2 (see there is now bbpress 2.2.1 plugin available)

    If something went wrong in the migration as you said John, I thought I would purge previous attempted import. I have just over 90 subscribers and 90 posts. Yesterday, the purge went on for hours, and I mean hours. I finally stopped it at 482,841,799 lines!!! This purge should have taken only 30 seconds for 90 posts/subscribers.

    Would this purge be the bbpress plugin problem or WP?


    kannued
    Participant

    @kannued

    So I updated to the new 2.2.1 bbpress plugin. Thought I would start fresh conversion. It had to finish deleting the previously converted data went to 482842099 lines. Then started the fresh conversion.

    I still have anonymous posters with the occasional real poster. A thread started by an occasional real poster is the wrong poster using bbpress 1.1 reference.


    kannued
    Participant

    @kannued

    Topic tags don’t show up when I visit the site. That was a problem before too in previous converstions.

    When I view the topic tags in admin, the tags show up including a bunch of spam tags that I had deleted in bbpress 1.1


    kannued
    Participant

    @kannued

    For the problems with the original poster and post no longer linked together but attributed to anonymous for the most part:

    Could it be that since the deleted posts in bbpress 1.1 are still in the database as there is no way to empty the deleted creating problems during integration?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Could it be that since the deleted posts in bbpress 1.1 are still in the database as there is no way to empty the deleted creating problems during integration?

    Correct. The migration doesn’t *fix* anything, it migrates exactly what you already have.


    kannued
    Participant

    @kannued

    But the deleted posts/topics can’t be the problem because the deleted topics in bbpress show up in the trash of wp. The exact number transfers. The exact number of users transfer correctly. So those are clear migrations with no problems.

    The exact number of topics transfer correctly. But it is that link between the topics and the users that transfer incorrectly.

Viewing 25 replies - 1 through 25 (of 26 total)

You must be logged in to reply to this topic.