MyBB Community Forums
MyBB SQL error while using DVZ Shoutbox Bot plugin - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: MyBB SQL error while using DVZ Shoutbox Bot plugin (/thread-219479.html)



MyBB SQL error while using DVZ Shoutbox Bot plugin - kbilly - 2018-08-29

Hello everyone!

My hosting company has recently upgraded their servers,the new version is MySQLi 10.2.15.

After the upgrade,i noticed that my users weren't able to post replies or threads while clicking on the post button because they were getting the following error.

   

They had to go back and then click on post button,then the thread or post were posted.

I noticed that the new posts/threads weren't shown on Shoutbox as i have activated the DVZ shoutbox bot plugin.

So,i thought to disable it and retry to post some threads,everything is working fine without that plugin.

Finally,i unistalled the plugin and wanted to install it again to make it work as i really like this plugin,i got the following/same error in the ACP.

   

My php version has not been updated as i am still using the same i.e. the 7.0.31.

Is this malfunction caused by the update of MySQLi version? As i had the version 5 something before the upgrade.

Any suggestions?

Kind regards.


RE: MyBB SQL error while using DVZ Shoutbox Bot plugin - kbilly - 2018-08-31

Nobody can help me? Sad

After following this thread  i modified/deleted some values and was able to install the plugin but when i post in the forum where the plugin is activated,it will show the following:

   

Here is the error log:

<error>
    <dateline>1535725126</dateline>
    <script></script>
    <line>0</line>
    <type>20</type>
    <friendly_type>MyBB SQL Error</friendly_type>
    <message>SQL Error: 1366 - Incorrect integer value: 'NULL' for column 'sid' at row 1
Query: 
            INSERT
            INTO mybbmm_settings (`sid`,`name`,`title`,`description`,`optionscode`,`value`,`disporder`,`gid`)
            VALUES ('NULL','dvz_shoutbox_bot_on','Plugin on/off','Plugin enabled/disabled?','onoff','1','1',206), ('NULL','dvz_shoutbox_bot_link_on','Get a login link?','Specifies whether the plugin is to get a link to the profile. Example @Nick.','yesno','yes','2',206), ('NULL','dvz_shoutbox_bot_action_on','Should the bot react to messages entered in the chat?','Determines whether the bot should respond to messages provided in the admin panel. You can manage them <a href=\"index.php?module=user-dvz_shoutbox_bot\">here</a>.','yesno','yes','3',206), ('NULL','dvz_shoutbox_bot_id','Bot\'s ID','Enter the id of the user who will be sending the message in the chat.','numeric','1','4',206), ('NULL','dvz_shoutbox_bot_register_on','Should the bot send a chat message when the user registers?','Determines wheter bot should be sending a message on chat if user will register.','yesno','yes','5',206), ('NULL','dvz_shoutbox_bot_register_message','Message sent to the chat, if the user registers.','Message that will be sent by the bot. Use <b>{username}</b> to replace the login.','textarea','The player {username} has just registered. Welcome!','6',206), ('NULL','dvz_shoutbox_bot_thread_on','Should the bot send a chat message if the user will writes a new thread?','Determines wheter bot should send message on chat if user write new thread.','yesno','yes','7',206), ('NULL','dvz_shoutbox_bot_ignore','Ignoring forums','Choose from list of that the bot should ignore.','forumselect','','8',206), ('NULL','dvz_shoutbox_bot_thread_message','Message sent on chat if user will write new thread','Message that will be sent by the bot. Use <b>{username}</b> to replace the login, <b>{subject}</b> to download thread subject, <b>{forum}</b> to get name of forum.','textarea','New thread - {subject} in forum {forum}. Sent by {username}','9',206), ('NULL','dvz_shoutbox_bot_post_on','Should the bot send a chat message if the user will write a new post?','Determines wheter bot should sent message on chat if user will write new post.','yesno','yes','10',206), ('NULL','dvz_shoutbox_bot_post_message','Message sent to the chat, if the user writes a new post','Message that will be sent by the bot. Use <b>{username}</b> to replace the login, <b>{subject}</b> to get title of post.','textarea','New post - {subject} Written by {username}','11',206)
        </message>
</error>

And here is the modified file:


.php   dvz_shoutbox_bot_class.php (Size: 7.87 KB / Downloads: 77)

Thanks


RE: MyBB SQL error while using DVZ Shoutbox Bot plugin - kbilly - 2018-09-02

Still wondering if somebody can help me out...


RE: MyBB SQL error while using DVZ Shoutbox Bot plugin - kbilly - 2018-09-03

anyone?


RE: MyBB SQL error while using DVZ Shoutbox Bot plugin - Devilshakerz - 2018-09-03

The posted error doesn't seem to be related to issues after the installation; you can try adding a ipaddress field in the shout() method (it should be present in INSERT queries for that table) with some default value:
     $data = [
         'uid' => $this->bot_id,
         'text' => $text,
         'date' => TIME_NOW,
         'ipaddress' => $this->db->escape_binary(my_inet_pton('127.0.0.1'))
      ];



RE: MyBB SQL error while using DVZ Shoutbox Bot plugin - kbilly - 2018-09-04

(2018-09-03, 09:06 PM)Devilshakerz Wrote: The posted error doesn't seem to be related to issues after the installation; you can try adding a ipaddress field in the shout() method (it should be present in INSERT queries for that table) with some default value:
     $data = [
         'uid' => $this->bot_id,
         'text' => $text,
         'date' => TIME_NOW,
         'ipaddress' => $this->db->escape_binary(my_inet_pton('127.0.0.1'))
      ];

Added it as following:

   

Can't see nothing on the plugin page in ACP.

EDIT EDIT :

Somehow it started working again,i deleted the old files,then uploaded the fresh files and it started working again,so,for now,i would consider the problem solved.

Thankyou @Devilshakerz for your time also.

Regards.