spwestwood (@spwestwood)

Forum Replies Created

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

  • spwestwood


    Thanks for the reply Stephen,

    However I’m not sure the shortcode [bbp-forum-index] will help me.
    My blog is at website.com/blog. If I create a page called called ‘test’ with that shortcode then it will be at:
    Also that’s just the index page. The actual forum posts/categories etc will still be at website.com/blog/forum/*




    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.



    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)

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