topic_note error; database not updated?

Started by Hootowls, September 08, 2019, 06:08:23 PM

Previous topic - Next topic

Hootowls

Hello! Whenever my members try to post, the following error is received:
Field 'topic_note' doesn't have a default value
File: /home/bearbone/public_html/Sources/Subs-Post.php
Line: 1828

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


How do I execute upgrade.php? Is there a certain code I need to know for that? Any help would be greatly appreciated! <3

Hootowls

#1
With further research, this stems from the "Topic Note" mod, but...that's uninstalled? It hasn't been on the forum in a long time, if ever

Version Information:
Forum version: SMF 2.0.15 (more detailed)
Current SMF version: SMF 2.0.15
GD version: bundled (2.1.0 compatible)
Database Server: MariaDB
MySQL version: 10.3.17-MariaDB-log-cll-lve
PHP: 7.0.33
Server version: LiteSpeed

When viewing the more detailed of my forum version, I noticed that index.english-utf8.php is in red since it's 2.0.12. Is that the problem?

And on line 1828:
");"
But around it, it's:
array(
$topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
$msgOptions['smileys_enabled'] ? 1 : 0, '', $msgOptions['icon'], $msgOptions['approved'],
),
array('id_msg')
);
$msgOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}messages', 'id_msg');

// Something went wrong creating the message...
if (empty($msgOptions['id']))
return false;

// Fix the attachments.
if (!empty($msgOptions['attachments']))
$smcFunc['db_query']('', '
UPDATE {db_prefix}attachments
SET id_msg = {int:id_msg}
WHERE id_attach IN ({array_int:attachment_list})',
array(
'attachment_list' => $msgOptions['attachments'],
'id_msg' => $msgOptions['id'],
)
);


edit;; the error changed to
Field 'topic_note' doesn't have a default value
File: /home/bearbone/public_html/Sources/Subs-Post.php
Line: 1827

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

shawnb61

Most mods do not remove database components upon de-install.  Looks like you have a custom column left over from that mod.

So...   Either remove the unneeded column, or, give it a default value.  You can give it a default value using phpmyadmin.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Hootowls

By any chance do you know what the custom column is called? I tried searching for it in phpMyAdmin earlier (I found older threads regarding this issue), but no luck

shawnb61

From the error message: topic note.  Give it a default value.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Hootowls

The only thing I found regarding topic_note is "allow_topic_note" in the table search under columns. Do I just type default in the value box, or is there a certain thing I have to do? The box is blank, and the operator dropdown is =

(Sorry for being slow btw!! I'm very not used to this stuff, but your help is super duper appreciated!)

Hootowls

Wait, no, I got it! I was looking in the wrong table, for some reason it was under "messages"?

Thank you for the help, dude!!

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: