News:

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

Main Menu

upgrade to 2.0.17, get db error on new posts

Started by oaqm, September 26, 2020, 12:25:39 PM

Previous topic - Next topic

oaqm

any attempt at posting gets this:

Field 'nowPlaying' doesn't have a default value
File: /home/cstock55/public_html/forum/Sources/Subs-Post.php
Line: 1834

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


Upgrade.php has been run with no joy. Can anyone point me in a direction to restore functionality?

shawnb61

That looks like a mod added a column without a default value. 

To get the forum working, I would find that field in the DB and give it a default value.  We've seen this before with other mods & columns.  null usually works as a default value. 

Once the forum is running, I would look at the mod.  If it is still supported, you may need to get it current.  If it is not supported, you should consider uninstalling it or replacing it.

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

oaqm

The "nowPlaying" comes back to a mod that has never been installed.

from reading this post
https://www.simplemachines.org/community/index.php?topic=90390.msg594237#msg594237

I tried replacing the Post.php file but still no joy. I have also deleted the nowPlaying field and am still getting the same error.

I should add, the ONLY mod I had installed was the Youtube mod, which I have since removed while trying to figure this out. I am running the default theme.

shawnb61

The problem does not appear to be with the source, it's with the database.  I think in the messages table.

You need to find all instances of that field in the DB and either remove them or give them default values.  null usually works.

The mod must have been installed previously - even if only temporarily - or the field wouldn't exist.  That field is not in SMF on a fresh install. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

oaqm

I did set the field to null and got similar results.

No insult to the person who wrote the now playing mod, but that just isn't the sort of thing I am interested in. I don't care what anyone is listening to.

This issue did not show up until today, when I did the update to the current version.

The only place "nowPlaying" shows up is in the error logs and the smf_settings - which it no longer does as I deleted it.

I am contemplating just doing a total reinstall of SMF, but I am concerned that the backup of the db I did is "tainted" by this error.


EDIT: Well, you were correct about where it was, an Admin who has been gone for years apparently installed it. Why it is not showing up in searches I cannot answer. I will beat on this some more and see if I can make the forum work.

THANK YOU for your assistance, it is greatly appreciated.

oaqm

I dropped it from messages and I now have a functioning board.

Again, thank you!

Please mark as solved.

Advertisement: