News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Members converted to guests

Started by jraabe, November 19, 2007, 07:36:31 PM

Previous topic - Next topic

jraabe

While the conversion from YaBB2.1 generally went smooth there are a few "anomalies" http://countryplans.com/smf/index.php?topic=3581.msg40194#msg40194 [nofollow]

One of the main things is that registered members have been, in many but not all cases, converted into guests with no profile settings and no post count.

In this 10 page thread the early posts have the member profile information intact and then toward the later pages everyone turns into a guest, including the same members who were identified properly in earlier posts. After conversion posts when the member has updated their profile are fine.

http://countryplans.com/smf/index.php?topic=2335.180 [nofollow]

I have tried the Admin repairs but it didn't help. Are there help links on this problem??

John Raabe
www.countryplans.com

SleePy

One thing it is your site seems to be loading really slow. But it doesn't look like SMF is the source as even your main page wont load.

How many members is it?

We could easily do a manual update to the messages table to fix this.

First find their ID_MEMBER.
This is simple as going to view their profile and then looking at the url
You will see
http://countryplans.com/smf/index.php?action=profile;u=###

The ### is their ID_MEMBER which is a unique number given to each member. No mater what changes, this shouldn't change at all.

Now we just issue a manual SQL query. This requires phpMyAdmin. What is phpMyAdmin?

We fill in the information. Since your site isn't loading that quick it is taking to long to show an example.

But simply just replace ### in this with their ID_MEMBER you got from the url (It is in there twice)
Then replace USERNAME with their exact username being used in a guest post.

UPDATE smf_messages
SET ID_MEMBER = ###
WHERE memberName = "USERNAME"
AND ID_MEMBER 1= ###


Doing this will update all messages where they are a guest with that name and their ID_MEMBER isn't already set correctly (saving time for a bigger board).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

jraabe

#2
SleePy

Yes, the Site5 host was having some outages on the site server the last two days. The last one was this morning at 7 am. Great Timing right while the forum is in transition. :-X???

I will give a try to your suggested update above...

We have 2162 members. Probably won't be doing a manual update on all  :(




jraabe

#3
OK, this is a little scary for me... messing around in a database! :o

Here is the setup for one member:



Link to larger image: http://i56.photobucket.com/albums/g166/jraabe/query.jpg [nofollow]

When I submit it says "You have to choose at least one column to display" I have to do something more here.... choose a field perhaps?

SleePy

Click on the SQL tab and try that query.

All in all, make a backup though. Incase things dont go right (though they shouldn't)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Rovin

Okay, I converted and got the same problem. How and what do I do with the phpMyAdmin? I have read your post and do not understand. What key?

Panzer Boxb

#6
SleePy, your SQL is a bit off.

UPDATE smf_messages
SET ID_MEMBER = ###
WHERE memberName = "USERNAME"
AND ID_MEMBER 1= ###


Should be:

UPDATE smf_messages
SET ID_MEMBER = ###
WHERE posterName = "USERNAME"
AND ID_MEMBER = ###


That works great for a single user but I encountered the same problem where many of my forum posts were attributed to Guests even though the user's name was clearly captured.  There is a much easier way to do a bulk update in the database to resync this.

UPDATE smf_messages,smf_members
SET smf_messages.ID_MEMBER=smf_members.ID_MEMBER
WHERE smf_messages.posterName=smf_members.memberName and smf_messages.ID_MEMBER = 0


This should grab the correct ID_MEMBER from the members table where a post has a correct member name but the ID_MEMBER was set to 0.

Rovin, go into your phpMyAdmin, select the SMF database, then select the SQL tab, paste the SQL statement into that box and hit the "Go" button.

SleePy

Ahh thanks. I missed a shift while typing that and it came out as one instead of !

BTW, 2.0 has a way to reattribute posts the way I posted. Maybe a user can make a simple mod to do your method as well for 2.0 (and 1.1 if they want to back port the changes).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

aerow90

Hi, I am from Germany, and have the same problem. In German Board nobody can help me so I want to ask here. You have to know that I am a newbie in mysql and PHP but I do not get this done. I only have one database were all my mysql required programms stay, so I can not choose a database calle _SMF (I think so) What can I do to get the half of my Threads normal and not as Guest Members?

Panzer Boxb

aerow90, do you have access to phpmyadmin for your database?  If so, you will use the SQL code I posted above to correct the problem.

If you do not have phpmyadmin installed, you will need to use the mysql command line to enter the command.

aerow90

Hi, thank you for help, but I am so sorry, I do not know how to do that, my Phpmyadmin looks like this:

SleePy

You will need to select one of the SMF tables on the left.

The queries above will need to be alerted so that "smf_" is replaced with "smf1_".
"smf1_" seems to be your prefix so we have to alter the default prefix used abvoe.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

aerow90

Wow, now it works, this easy little mistake, thanks a lot

Advertisement: