Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Sassafras on March 12, 2019, 03:06:53 AM

Title: Posting Error
Post by: Sassafras on March 12, 2019, 03:06:53 AM
Hello, everyone. My users and I are having a bit of trouble posting on my forum because of a database error that occurs whenever we try. The error in question that spawns whenever we try is as follows:

QuoteDatabase Error
Field 'description' doesn't have a default value
File: /home/redventu/public_html/redwallsurvivor.com/forums/Sources/Subs-Post.php
Line: 1817

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.4. The above error might possibly go away if you execute the latest version of upgrade.php.

I am not too savvy when it comes to messing with code, so any help at all with fixing this would be very appreciated.
Title: Re: Posting Error
Post by: Arantor on March 12, 2019, 03:48:44 AM
Can you post your Subs-Post.php file please? I imagine you have/had a mod that adds some kind of description field but I'm not sure where that would be exactly, so I can tell you which things to change in the database to fix this. (It's where your host has upgraded MySQL and it used to permit very lax settings but now it's not allowed to.)
Title: Re: Posting Error
Post by: Sassafras on March 12, 2019, 05:17:37 AM
I've attached it to this reply. Please tell me if it goes through okay for you.
Title: Re: Posting Error
Post by: Arantor on March 12, 2019, 02:52:31 PM
OK, now I'm not at work and on a real PC I can take a look at this.

To fix this, you need to go to your database - in phpMyAdmin, you'll usually find this in your hosting control panel (outside of SMF) - and find the table that is usually called smf_messages. It might be called something slightly different in your case, though.

Once you find that table, go to the Structure tab, which should show you all the columns of that table, and in that list should be an entry called "description". If you edit this column, and tick the box labelled 'null' and save, it should work properly again.
Title: Re: Posting Error
Post by: Sassafras on March 12, 2019, 06:56:07 PM
Worked like a charm. Thanks so much :)