SMF Support > Install and Upgrade Help
Upgrade error on membergroups
orange:
I decided to try out upgrading a copy of my YSE 1.5.5 forum to SMF, but on step 6 of the upgrade process I get this:
Converting "membergroups"... Unsuccessful!
This query:
INSERT IGNORE INTO yabbse_membergroups
(ID_GROUP, groupName, onlineColor, minPosts, stars)
VALUES (1, 'Aztec Guy\'s Friend', '#FF0000', -1, '5#staradmin.gif'),
(2, 'Global Moderator', '#0000FF', -1, '5#stargmod.gif'),
(3, 'Moderator', '', -1, '5#starmod.gif'),
(4, 'Member', '', 0, '1#star.gif'),
(5, 'Member', '', 9999, '2#star.gif'),
(6, 'Full Member', '', 10000, '3#star.gif'),
(7, 'Senior Member', '', 25000, '4#star.gif'),
(8, 'AGS God', '', 50000, '5#star.gif'),
(19, 'Mittens Veteran', '', -1, ''),
(18, 'Mittens Crew', '', -1, ''),
(20, 'Mittens '02', '', -1, '');
Caused the error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '02', '', -1, '')' at line 13
Presumably it's due to the fact that one of my membergroups has an apostrophe in its name - any ideas?
Chris Cromer:
Yeah it is because of the apostrophe.
Just remove the apostrophe for now then do the upgrade... then after the upgrade you can put the apostrophe back.
Grudge:
Yea, or change it to \'
ie:
20, 'Mittens \'02', '', -1, '');
orange:
Hehe, well, I'd better not start hacking around in the upgrade.php for the sake of my own health ;)
Renaming the membergroup sounds like the best workaround then - I'll give that a go, cheers :)
[Unknown]:
Actually, this is a problem caused by Settings.php not having certain things in it.
Open upgrade.php, and find the following:
--- Code: --- (5, '$membergroups[4]', '', $JrPostNum, '2#star.gif'),
(6, '$membergroups[5]', '', $FullPostNum, '3#star.gif'),
(7, '$membergroups[6]', '', $SrPostNum, '4#star.gif'),
(8, '$membergroups[7]', '', " . (isset($HeroPostNum) ? $HeroPostNum : $GodPostNum) . ", '5#star.gif')" .
--- End code ---
Replace it with:
--- Code: --- (5, '$membergroups[4]', '', '$JrPostNum', '2#star.gif'),
(6, '$membergroups[5]', '', '$FullPostNum', '3#star.gif'),
(7, '$membergroups[6]', '', '$SrPostNum', '4#star.gif'),
(8, '$membergroups[7]', '', '" . (isset($HeroPostNum) ? $HeroPostNum : $GodPostNum) . "', '5#star.gif')" .
--- End code ---
-[Unknown]
Navigation
[0] Message Index
[#] Next page
Go to full version