Warning: The author of this contribution does not provide support for it anymore.

Board watch

SQl Error when posting a topic - Board watch

SQl Error when posting a topic

by khans16 » Tue Dec 24, 2013 12:44 am

Since installing boardwatch I am getting SQL error while posting a topic. Do not see the error message when I just edit a topic. The topic is successfully posted though and can be viewed if I go back to Board Index. But I get this message after clicking on Submit. I upgraded to 3.0.12 today but this did not resolve the issue.

=================

SQL Error:

General Error
SQL ERROR [ mysqli ]

[0]

SQL

No values specified for SQL IN comparison

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/dbal.php
LINE: 432
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_posting.php
LINE: 1411
CALL: dbal->sql_in_set()

FILE: [ROOT]/includes/functions_posting.php
LINE: 2654
CALL: user_notification()

FILE: [ROOT]/posting.php
LINE: 1141
CALL: submit_post()

=====================


I had submitted a topic in The forum support board and they suggested and issue with Boardwatch.

Please see this topic for earlier discussion on this issue.
viewtopic.php?f=46&t=2218561
khans16
Registered User
Posts: 7
Joined: Mon Dec 23, 2013 8:35 pm
Contact:

Re: SQl Error when posting a topic

by asinshesq » Tue Dec 24, 2013 1:11 am

In that other topic, you said:

khans16 wrote:I should have clarified earlier but the error was there even before I installed boardwatch. The post does get submitted even though the error is displayed and email notification is also successfully delivered.

If that's true your problem can't be caused by boardwatch. In that other topic, I suggested you zip up your includes/functions_posting.php file and upload it there (or give us a link for it) so we can take a look and see what's wrong. Let's discuss this there since it's not boardwatch issue (and if it turns out that you were wrong about the problem pre-dating boardwatch and it is a boardwatch issue, we can report back here).
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan
Contact:

Re: SQl Error when posting a topic

by khans16 » Tue Dec 24, 2013 3:07 am

I was mistaken about that. I went back and checked the email thread and the problem was after the boardwatch install. The issue has been there for many months but since the post does go through I thought I would address it later. It is more of an annoyance than anything else but would like to know what may be causing this.

I have uploaded the file to the other topic as well.
Attachments
functions_posting.php.gz
Zip of includes/functions_posting.php
(19.92 KiB) Downloaded 248 times
khans16
Registered User
Posts: 7
Joined: Mon Dec 23, 2013 8:35 pm
Contact:

Re: SQl Error when posting a topic

by asinshesq » Tue Dec 24, 2013 10:32 am

You put a change in after a line but the mod tells you to put that change in before that line. Give this a try:

Code: Select all

OPEN
includes/functions.posting.php

FIND
   if (!empty($update_notification['topic']))
   // start mod boardwatch
   if (!empty($update_notification['boardwatch']))
   {
      update_boardwatch_status($boardwatch_yes_but_list);
   }
   // end mod boardwatch


REPLACE WITH

   // start mod boardwatch
   if (!empty($update_notification['boardwatch']))
   {
      update_boardwatch_status($boardwatch_yes_but_list);
   }
   // end mod boardwatch   if (!empty($update_notification['topic']))
   if (!empty($update_notification['topic']))

This is why I recommend people install mods with automod ;)
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan
Contact:

Re: SQl Error when posting a topic

by khans16 » Tue Dec 24, 2013 5:31 pm

Thanks a lot Alan. Your suggested code change fixed the problem. I will remember to use automod in future.
khans16
Registered User
Posts: 7
Joined: Mon Dec 23, 2013 8:35 pm
Contact: