TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 347
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 303
  • Total: 303

Fresh Install, error when posting to any TP feature i.e. shoutbox or new article

Started by rrackow, February 06, 2013, 09:26:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rrackow

Link to my forum: http://www.ftc-eve.com
SMF version: 2.0.4
TP version: 1.107
Default Forum Language: English-UTF-8
Theme name and version: SMF Default-Curve
Browser Name and Version: Chrome Version 24.0.1312.57 m
Mods installed: None, other than TinyPortal
Related Error messages: Multiple Errors, see below
Posting Article: Field 'body' doesn't have a default value
File: E:\Inetpub\ftc-eve.com\Sources\TPortalAdmin.php
Line: 3416

Posting Shout Box: Field 'value7' doesn't have a default value
File: E:\Inetpub\ftc-eve.com\tp-files\tp-modules\TPShout\Sources\TPShout.php
Line: 218

Fresh Install of both SMF and TP, no issues or errors during install. Done multiple installs before first I've seen of this.

Server is Windows Server 2003 running IIS 6

IchBin

This is likely because your server is running mysql in strict mode. Which doesn't allow text columns to have a default value. TP's query doesn't need to set each and every column, but your server is requiring that is has a default value of something. Even if something = nothing. lol

You can try changing this code in the TPShout.php file mentioned in your error.

if($shout != '')
            $smcFunc['db_insert']('INSERT',
'{db_prefix}tp_shoutbox',
array('value1' => 'string', 'value2' => 'string', 'value3' => 'string', 'type' => 'string','value4' => 'string', 'value5' => 'int'),
array($shout, $shout_time, $shout_name, 'shoutbox', $ip, $memID'),
array('id')
);


Change to this:
if($shout != '')
            $smcFunc['db_insert']('INSERT',
'{db_prefix}tp_shoutbox',
array('value1' => 'string', 'value2' => 'string', 'value3' => 'string', 'type' => 'string', 'value4' => 'string', 'value5' => 'int', 'subtype' => 'string', 'value7' => 'string', 'value8' => 'string', 'subtype' => 'int', 'value9' => 'string'),
array($shout, $shout_time, $shout_name, 'shoutbox', $ip, $memID, '', '', '', 0, ''),
array('id')
);

rrackow

Thank you IchBin™!

This is what happens when you have more tasks than time. I forgot all about that.

I (having remote desktop access) turned off strict mode all together, and solved the issue.

Thanks again. Back to work I go!


This website is proudly hosted on Crocweb Cloud Website Hosting.