SMF Support > SMF 1.1.x Support

Database Error, after mod/smiley upgrade

(1/1)

thechronic2001:
Hello
I've ran into some problems, yesterday I installed the custom form mod http://custom.simplemachines.org/mods/index.php?mod=1279 everything was working fine in regards to the mod working correctly.

Later on I decided to update the smiley set and added a new pack, for some reason now when i go to Admin CP/Features and Options then to custom forms section I get this error

--- Code: ---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 ')' at line 3
File: C:\Inetpub\vhosts\{domain}\httpdocs\{forum_path}\Sources\ModSettings.php
Line: 628

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.16, while your database is at version 1.1.13. The above error might possibly go away if you execute the latest version of upgrade.php.

--- End code ---

Line 628 of ModSettings.php is as follows

--- Code: ---WHERE ID_BOARD IN (0, $board)", __FILE__, __LINE__);

--- End code ---

Here is the start of that section down to the first "else"

--- Code: --- // Array for all icons that need to revert to the default theme!
$context['javascript_icons'] = array();

if (($temp = cache_get_data('posting_icons-' . $board, 480)) == null)
{
$request = db_query("
SELECT title, filename
FROM {$db_prefix}message_icons
WHERE ID_BOARD IN (0, $board)", __FILE__, __LINE__);
$icon_data = array();
while ($row = mysql_fetch_assoc($request))
$icon_data[] = $row;
mysql_free_result($request);

cache_put_data('posting_icons-' . $board, $icon_data, 480);
}
else

--- End code ---

Ive done some searching but i cant find any recent info that is not outdated, like this http://docs.simplemachines.org/index.php?topic=1079.0

Does anyone have any ideas on how to fix this error?
Do i need to upgrade my Database?

My forum Version is as follows:
SMF File                                 Your Version   Current Version
SMF Package                          SMF 1.1.16   SMF 1.1.16
Sources                                         1.1.16   1.1.16
Default Templates                         1.1.12   1.1.12
Language Files                               1.1.15   1.1.15
Current Templates                           1.1.5   1.1

Database server type          MySQL
Database server version          5.0.45


Any help would be greatly appreciated  ;)

MrPhil:
The $board variable either has no value, or has a non-integer value. Was this code added by a mod? It appears to not be setting $board correctly. I would ask on the mod's support topic, if you can figure out from the code which mod is responsible.

The database for 1.1.13 should be the same as for 1.1.16. You can ignore that message, or in phpMyAdmin manually change smf_settings' "smfVersion" from "1.1.13" to "1.1.16".

thechronic2001:
thanks for your reply bud, i changed the smf_version to 1.1.16 from within the database and the bottom section of the error is away

"Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.16, while your database is at version 1.1.13. The above error might possibly go away if you execute the latest version of upgrade.php."

But top section is still present, the thing is, i installed the mod on my test forum and it worked fine, fully functional, when i installed it on my real forum it installed and worked for a while then all of a sudden it stopped (i think around the time i was changing the smilies) I've removed and reinstalled the mod but it makes no difference.

maybe dropping the mod tables form the database then reinstalling may fix it,, what do you think?


edit: whe i uninstalled the mod it removed the DB tables, i tried another fresh install but error is still there, ill try  in the mod support thread ;)

thechronic2001:
I finally got this problem sorted after 2 days looking at random files, basically the above error occurs when you have "Enable customized message icons" in
Admin / Forum / Smileys and Message Icons  / Settings
If the "Enable customized message icons" Checkbox is Checked it Throws that sql error

I'm so happy i don't need to do any work on my database :), just a pity i remove loads of mods while looking for conflicts :(

but its working :)

Colin:
Glad to hear you got it all sorted out. Thank you also for taking the time to provide the solution to fellow SMFers. I went ahead and marked the topic as solved.

Navigation

[0] Message Index

Go to full version