Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress Upgrade shows I am author of all topics and replies


  • gingerngo
    Participant

    @gingerngo

    Hi all,

    I just did an upgrade from bbPress 1 (standalone version) to the latest version. I imported the old forum using the plugin’s Tools > Import Forum function. All my topics and replies are there, but it shows that I am the creator for everything. It’s very flattering, but now it just looks like I talk to myself:

    Some screenshots:
    http://cl.ly/image/0M331P0H2t30
    http://cl.ly/image/0Y2M00451c2O

    Is there a way to recalculate/import users?

    Do I need to re-import?

    Thanks!

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

  • gingerngo
    Participant

    @gingerngo

    After some more work, we are now wondering if this has to do with our use of the old bbpress/wordpress integration plugin for user accounts. Does that sound likely? Has anyone else run into this?


    rossjlennox
    Participant

    @rossjlennox

    Gingerngo – apologies for bombing your thread without an answer but I am seeing this exact behaviour on my own forum after upgrading from v1 to 2. Have you made any progress? I would be eternally grateful for any light you may be able to shed.

    P.S. I too had the integration plugin installed and active during the upgrade process.


    gingerngo
    Participant

    @gingerngo

    Hi rossjlennox,

    No worries. My poor quiet thread.

    We were actually unable to do a fix, but our solution was to restore the site to original and do a clean re-install, re-import. And I mean restore the site from the database as if from scratch, and not use any of the bbPress import or troubleshooting tools.

    My issue was that when I did the importer for the first time, I had forgotten to set the dropdown menu to “bbpress standalone.” The steps to import were very specific, and one small misstep like that affected everything. So the second time around, we made sure that all the settings and fields were correct before importing again.

    It now works for us.

    I would try restoring the site again and maybe deactivate all the plugins. Hope that helps.


    spwestwood
    Participant

    @spwestwood

    I’m also getting this problem upgrading from 1.03 to 2.2.
    As far as I could see the only problem was the post author field in the wp_posts database. It was all set as ‘1’ (the first user, ie me), instead of copying across from the orignal table (bb_topics/bb_posts). The users all seemed to be ok in wp_users. I therefore ran the following MySQL:
    update wp_posts
    inner join bb_topics
    on wp_posts.post_title=bb_topics.topic_title
    set wp_posts.post_author = bb_topics.topic_poster

    and then:
    update wp_posts
    inner join bb_posts
    on bb_posts.post_time = wp_posts.post_date
    set wp_posts.post_author = bb_posts.poster_id
    where wp_posts.post_author = ‘1’

    (I found that this worked for me, but please be careful and backup before running it)


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    That’s a pretty clever approach to fixing that specific problem. Nice work.


    kannued
    Participant

    @kannued

    I agree John, it is a clever approach.

    As John knows my problem is with Anonymous getting all the credit in posts. My wp_users are correct. The IP address link for each topic is correct. But the nickname assigned to the topics is incorrect. All plugins on bbpress 1.1 and wp 3.4.2 were deactivated before the migration/integration.

    I think I need to try what spwestwood did. But my MySQL skills are limited. Do I use new query for each statement? Or do I run the first four statements in a new query?


    spwestwood
    Participant

    @spwestwood

    Hi Kannued,

    There were 2 queries I posted. There needs to be 2 because previously in v1 bbPress had 2 seperate tables – one table for the initial topic post and then another table for the followup replies. All posts are now contained in wp_posts.

    So the first query takes all the author ids from the forum topics and copies them across to the wp_posts table:

    update wp_posts inner join bb_topics on wp_posts.post_title=bb_topics.topic_title set wp_posts.post_author = bb_topics.topic_poster

    The second then does all the replies:

    update wp_posts inner join bb_posts on bb_posts.post_time = wp_posts.post_date set wp_posts.post_author = bb_posts.poster_ id where wp_posts.post_author = ’1′

    (This is a bit messier. The only way I found to match bb_posts to wp_posts was by the time the post was made. For some reason looking at the text of the actual post didn’t match. Perhaps there was an encoding difference or something.)

    Before running either it might be a good idea to check you are getting the same error I have. If you run the following:

    select topic_title,topic_poster,post_author from wp_posts inner join bb_topics on wp_posts.post_title=bb_topics.topic_title order by bb_topics.topic_id desc

    This doesn’t make any changes. It shows you 3 columns: topic title / author in old bbpress / author in new bbpress.

    For me the 3rd column was all 1s (which is my user id). So all I had to do was copy the second column across, which is what the 2 queries above do.


    kannued
    Participant

    @kannued

    Ran the check you suggested spwestwood, my second and third columns match. No problems there.

    I know I had a lot of problems with anonymous spammers where I had to shut down the forum. The anonymous posters would not aim to post publicly but just to fill my recently moderated section with website links and marketing talk. Even though I had long ago deleted the anonymous poster file, the anonymous posters were still a problem internally, creating havoc.


    sbroways
    Participant

    @sbroways

    I’m really hoping someone can help me figure out some sql queries I would like to run (especially spwestwood). I have been working on migrating a forum for a number of days now and would love if I could get some help on this last piece. I started out with a Phorum > migrated to SMF > migrated to phpBB3 > migrated to bbPress. The first 3 conversions were all successful. I would stay with phpBB3 but even after I loaded WordPress I could not get all my PHP to work properly on the forum page and I really like the bbPress integration into WordPress. But, I have the same anonymous error on the majority of my posts (55k) because, I believe, these are actually anonymous users who were not required to sign-up in order to post. The problem seems to be that bbPress uses only an ‘id’ to attach the name of the poster to the post and phpBB3 uses a ‘username’ field that actually contains the name within the table. All of these unregistered users simply default to user id = anonymous (1998 in my case). Here’s my solution… only, I don’t really know how to implement it as I have limited mySQL experience.. so please bare with me as this is all theoretical and I have no idea if it will work… and how to write it out in sql commands.

    Step 1: I want to take phpbb_posts.post_username and assign new users in wp_users for each unique user name (I want to avoid duplicates obviously!). I would like that user_name assigned to both wp_users.user_login and wp_users.display_name. Now I have user accounts for all these anonymous posters.

    Step 2: Convert the date format in phpbb_posts.post_time from an integer to the ‘datetime’ php format using the from_unixtime sql command… or something. That way I can accurately match the date/time field in both databases since they currently use different encoding.

    Step 3. When wp_posts.post_date = phpbb_posts.post_time match phpbb_posts.post_username to wp_users.user_login GET id and assign to wp_posts.post_author

    Does this make any sense? Or am I completely off the ball here? THANK YOU SO MUCH for any help!!


    sbroways
    Participant

    @sbroways

    I was able to complete step 1 with the following sql query:

    INSERT INTO wp_users (user_login)
    SELECT DISTINCT post_username FROM phpbb_posts

    Now I have transferred over the user names and need to work on step 2 which I think can actually be combined with step 3 as one function… but would still love to hear any ideas.


    sbroways
    Participant

    @sbroways

    If anyone has any ideas I’m working on this issue on Stack Overflow as well. I think I’ve done a better job explaining it there and getting some good code put together from contributors but haven’t reached the finish line.

    MySQL query help moving data between tables

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