News:

Join the Facebook Fan Page.

Main Menu

Database error on post

Started by -=[Vyorel]=-, July 07, 2013, 06:23:30 AM

Previous topic - Next topic

-=[Vyorel]=-

Hi,

I have an error after i post a topic

QuoteField 'is_solved' doesn't have a default value
File: /home/samp/public_html/forum/Sources/Subs-Post.php
Line: 1871


$smcFunc['db_insert']('',
'{db_prefix}topics',
array(
'id_board' => 'int', 'id_member_started' => 'int', 'id_member_updated' => 'int', 'id_first_msg' => 'int',
'id_last_msg' => 'int', 'locked' => 'int', 'is_sticky' => 'int', 'num_views' => 'int',
'id_poll' => 'int', 'unapproved_posts' => 'int', 'approved' => 'int', 'id_prefix' => 'int',
),
array(
$topicOptions['board'], $posterOptions['id'], $posterOptions['id'], $msgOptions['id'],
$msgOptions['id'], $topicOptions['lock_mode'] === null ? 0 : $topicOptions['lock_mode'], $topicOptions['sticky_mode'] === null ? 0 : $topicOptions['sticky_mode'], 0,
$topicOptions['poll'] === null ? 0 : $topicOptions['poll'], $msgOptions['approved'] ? 0 : 1, $msgOptions['approved'], $msgOptions['id_prefix'],
),
array('id_topic')
); //line 1871
$topicOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}topics', 'id_topic');


What is the problem? :-\
My mods for SMF - [6].

kat

"Field 'is_solved'" suggests a mod install screwed.

As you don't tell us what mods you have, one would assume it's a "Mark as solved" one?

Storman™

Find and edit that field in your database (in smf_topics) with phpmyadmin, add 0 as the default value.

As with any database changes, BACKUP your database first !

-=[Vyorel]=-

Using Topic Solved Mod, but i have reinstalled forum and the problem persists.

I changed row value from 1 to 0 but without solving...

QuoteUPDATE `smf_topics` SET `is_solved`=0 WHERE 1


Now, my forum has the original files
My mods for SMF - [6].

Colin

No that query is not valid. It is changing the value for existing records only, not new. You can configure the default value in the table structure in PHPMYADMIN
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

-=[Vyorel]=-

Quote from: Colin on July 07, 2013, 06:46:07 AM
No that query is not valid. It is changing the value for existing records only, not new. You can configure the default value in the table structure in PHPMYADMIN
Oo yeah. Thank you very much.


Solved!
My mods for SMF - [6].

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

kat


Advertisement: