Advertisement:

Author Topic: Error - sent messages  (Read 646 times)

Offline maav

  • Semi-Newbie
  • *
  • Posts: 23
Error - sent messages
« on: August 22, 2019, 02:10:23 PM »
After typing a reply in the post, SMF writes me an error:

Code: [Select]
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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,430
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error - sent messages
« Reply #1 on: August 22, 2019, 03:03:50 PM »
go into the database with phpmyadmin and give that column a default value (usually NULL)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline maav

  • Semi-Newbie
  • *
  • Posts: 23
Re: Error - sent messages
« Reply #2 on: August 22, 2019, 03:37:03 PM »
It is set to 0 and probably correct.
There will be no mistake.
Thanks

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,430
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error - sent messages
« Reply #3 on: August 22, 2019, 03:57:31 PM »
that is untrue....

if the default should be NULL, that is different from a default of 0 and may have very different results.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline maav

  • Semi-Newbie
  • *
  • Posts: 23
Re: Error - sent messages
« Reply #4 on: August 23, 2019, 01:12:07 AM »
Thanks.
No. The default value is 0.

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 863
2.0.15, ssl, php 7.1.31, MySQL 10.3.13-MariaDB~bionic
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,396
    • StoryBB/StoryBB on GitHub
Re: Error - sent messages
« Reply #6 on: August 23, 2019, 07:13:12 AM »
Thanks.
No. The default value is 0.

How did you arrive at that?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline maav

  • Semi-Newbie
  • *
  • Posts: 23
Re: Error - sent messages
« Reply #7 on: August 23, 2019, 03:02:18 PM »
I looked at the table.
Thank you

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,396
    • StoryBB/StoryBB on GitHub
Re: Error - sent messages
« Reply #8 on: August 23, 2019, 03:08:16 PM »
*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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,104
  • Gender: Male
    • Macedonian electronics forum
"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?"..."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,396
    • StoryBB/StoryBB on GitHub
Re: Error - sent messages
« Reply #10 on: August 24, 2019, 04:12:53 AM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline maav

  • Semi-Newbie
  • *
  • Posts: 23
Re: Error - sent messages
« Reply #11 on: August 27, 2019, 01:03:28 PM »
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