News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Posting Error

Started by Sassafras, March 12, 2019, 03:06:53 AM

Previous topic - Next topic

Sassafras

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.

Arantor

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.)

Sassafras

I've attached it to this reply. Please tell me if it goes through okay for you.

Arantor

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.

Sassafras

Worked like a charm. Thanks so much :)

Advertisement: