1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 After import, some posts by Guest

Discussion in 'Troubleshooting and Problems' started by Donnie La Curan, Apr 16, 2013.

  1. Donnie La Curan

    Donnie La Curan Active Member

    A user brought it up to me today. He actually had to make a new account because it didn't exist in the import. Though he said if you search for his username it pulls up all the posts he made. I looked in the thread and post table but all of those ids are associated with Guest user_id 0.

    Kinda strange that search for his name pulls those posts up but they are in no way associated with him, that I can tell.

    I did a search for all threads by Guest and there were ~150. Same thing for posts but about ~450.

    Anything I can do to reassociate those posts to the appropriate users? Or are they just lost in the void.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Run these queries:

    Code:
    UPDATE xf_post
    SET user_id = new_user_id, username = 'new username'
    WHERE username = 'old username'
    AND user_id = 0;
    
    UPDATE xf_thread
    SET user_id = new_user_id, username = 'new username'
    WHERE username = 'old username'
    AND user_id = 0;
    
    Then rebuild the caches:

    Admin CP -> Tools -> Rebuild Caches

    And update the post counts:

    http://xenforo.com/community/resources/rebuild-user-post-counts-query.363/
     
  3. Donnie La Curan

    Donnie La Curan Active Member

Share This Page