Advertisement:
NameCheap

Author Topic: Wrong value type sent to the database. Integer expected. (id_msg)  (Read 4026 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

  • SMF Super Hero
  • *******
  • Posts: 14,161
  • 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. :)


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

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

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

  • SMF Super Hero
  • *******
  • Posts: 14,161
  • 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...


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

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

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

  • SMF Super Hero
  • *******
  • Posts: 14,161
  • 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.


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

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

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

  • SMF Super Hero
  • *******
  • Posts: 14,161
  • 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?


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 62,941
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?
And his eyes have all the seeming of a demon's that is dreaming,
And the lamp-light o'er him streaming throws his shadow on the floor

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

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 62,941
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?
And his eyes have all the seeming of a demon's that is dreaming,
And the lamp-light o'er him streaming throws his shadow on the floor