News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Error - sent messages

Started by maav, August 22, 2019, 02:10:23 PM

Previous topic - Next topic

maav

After typing a reply in the post, SMF writes me an error:

Field 'hiddenInfo' doesn't have a default value
File: /home/user01443/roomxxx.com/www/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.


How can I fix it?
Thank you

Kindred

go into the database with phpmyadmin and give that column a default value (usually NULL)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

maav

It is set to 0 and probably correct.
There will be no mistake.
Thanks

Kindred

that is untrue....

if the default should be NULL, that is different from a default of 0 and may have very different results.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

maav

Thanks.
No. The default value is 0.

a10

2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Arantor

Quote from: maav on August 23, 2019, 01:12:07 AM
Thanks.
No. The default value is 0.

How did you arrive at that?

maav

I looked at the table.
Thank you

Arantor

*shrug* I still wouldn't make that assumption, even after looking at the table, the only way I'd make that assumption is by looking at and understanding the code. I've seen weirder things where the table nearly always had one value but that it wasn't the default and things broke by making it the default.

The recommendation to make it null is much safer for future reference.

GigaWatt

"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Arantor

What do you think phpMyAdmin does under the hood?

Anyway the debate is not "how to set a default" as such, but rather setting an explicit default vs setting no default by way of null.

maav

Kindred is right. I looked at the problem again and the item was not set.
I set up and the error is already OK.
Thank you

Advertisement: