• 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

#1
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.
 

Jake Bunce

XenForo moderator
Staff member
#2
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/