Advertisement:

Author Topic: Wrong value type sent to the database. Integer expected. (id_msg)  (Read 3486 times)

Offline PacoCro

  • Newbie
  • *
  • Posts: 2
Started to happen on my forum. Dont know why... didnt change forum for a while and suddenly it came.


Database error:
Wrong value type sent to the database. Integer expected. (id_msg)

Link
c9fans.com/forum/c9-general-discussion/new-topic-is-here/

PS:
When I want to create a post it comes with this:

Table 'banitara_c9forum.related_subjects' doesn't exist
File: /home/banitara/public_html/woi/forum/Sources/Subs-RelatedFulltext.php
Line: 110
« Last Edit: April 04, 2012, 09:21:16 PM by N. N. »

Offline emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,056
  • Gender: Male
  • THERE'S JUST ME
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #1 on: April 04, 2012, 09:34:39 AM »
Hello PacoCro and welcome to sm.org!

It seems to be related to a mod: Subs-RelatedFulltext.php is not a SMF "core" file.
A quick search on google brought up:
http://www.simplemachines.org/community/index.php?topic=285866.0
that could solve your issue. :)
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline PacoCro

  • Newbie
  • *
  • Posts: 2
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #2 on: April 04, 2012, 09:43:33 AM »
Thank you so much. Related topics mod was the problem. We should not use it in case we want to run forum smooth.
:)

Offline emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,056
  • Gender: Male
  • THERE'S JUST ME
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #3 on: April 04, 2012, 09:52:18 AM »
Well, looking closely at the error is seems that a table is missing, so either the mod was not installed properly or the table has been deleted...
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Forumtastic

  • Semi-Newbie
  • *
  • Posts: 31
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #4 on: July 27, 2012, 12:10:02 AM »
This just started happening to me. I do not have that mod installed.

Wrong value type sent to the database. Integer expected. (id_msg)<br />Function: MessageIndex

Sources/MessageIndex.php
« Last Edit: July 27, 2012, 12:20:59 AM by Forumtastic »

Offline emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,056
  • Gender: Male
  • THERE'S JUST ME
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #5 on: July 27, 2012, 07:29:17 AM »
Forumtastic a bit more informations would be helpful...for example the exact error message that appears in the error log.
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Forumtastic

  • Semi-Newbie
  • *
  • Posts: 31
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #6 on: July 27, 2012, 07:52:00 AM »
I can't divulge our members IP addresses (I'm leaving out session information as well) for legal reasons but here is the relevant information from the error log:

id_error: 27
url: ?/board,1.0.html
message: Wrong value type sent to the database. Integer expected. (id_msg)<br />Function: MessageIndex
error type: critical
file: Sources/MessageIndex.php
line: 145

It looks like it is happening on this line:

$smcFunc['db_insert']('replace',
    '{db_prefix}log_boards',
    array('id_msg' => 'int', 'id_member' => 'int', 'id_board' => 'int'),
    array($modSettings['maxMsgID'], $user_info['id'], $board),
    array('id_member', 'id_board')
);

So it appears it has something to do with logging which boards have been seen.

Offline emanuele

  • Language Moderator
  • SMF Super Hero
  • *
  • Posts: 14,056
  • Gender: Male
  • THERE'S JUST ME
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #7 on: July 27, 2012, 08:35:17 AM »
Do you have any other error message that could be related, maybe just before that one in the same file?

And also: mods installed?
Do you want to discover what I'm doing? Here it is!



Hai bisogno di supporto in Italiano?

* emanuele dislikes "like" and alike

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

It has been reported to me that I'm being snarky, feel free to be offended by my comments, I'm probably doing it on purpose...or not.

Offline Arantor

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 58,417
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #8 on: July 27, 2012, 10:52:41 AM »
Better question, in the settings table, is there an entry for maxMsgID and if so what is it?

Offline Forumtastic

  • Semi-Newbie
  • *
  • Posts: 31
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #9 on: July 27, 2012, 01:35:30 PM »
maxMsgID = 553384

And no related errors.

It's not consistent either. It generated about 300 errors within a couple of days but most of the time, people do not receive the error. It's a very busy forum.

Offline Arantor

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 58,417
Re: Wrong value type sent to the database. Integer expected. (id_msg)
« Reply #10 on: July 27, 2012, 06:10:53 PM »
Do you have any mods related to posting?