Jump to content

IPS\Db\Exception: Field 'cache_sm' doesn't have a default value (1364)


Go to solution Solved by CA3LE,

Recommended Posts

INSERT INTO `ipbforums_topics` ( `start_date`, `last_post`, `starter_id`, `starter_name`, `last_real_post`, `last_poster_id`, `last_poster_name`, `forum_id`, `approved`, `state`, `views`, `pinned`, `featured`, `posts`, `topic_queuedposts`, `topic_hiddenposts`, `title`, `title_seo`, `poll_state` ) VALUES ( 1649440272, 1649440272, 2, 'CA3LE', 1649440272, 2, 'CA3LE', 10, 1, 'open', 0, 0, 0, 0, 0, 0, 'test', 'test', NULL )
IPS\Db\Exception: Field 'cache_sm' doesn't have a default value (1364)
#0 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Db/Db.php(938): IPS\_Db->preparedQuery()
#1 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Patterns/ActiveRecord.php(487): IPS\_Db->insert()
#2 /var/www/vhosts/testmy.net/httpdocs/ipb/applications/forums/sources/Topic/Topic.php(1531): IPS\Patterns\_ActiveRecord->save()
#3 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Content/Item.php(568): IPS\forums\_Topic->save()
#4 /var/www/vhosts/testmy.net/httpdocs/ipb/applications/forums/sources/Topic/Topic.php(575): IPS\Content\_Item->processForm()
#5 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Content/Item.php(402): IPS\forums\_Topic->processForm()
#6 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Content/Item.php(138): IPS\Content\_Item::createFromForm()
#7 /var/www/vhosts/testmy.net/httpdocs/ipb/applications/forums/modules/front/forums/forums.php(594): IPS\Content\_Item::create()
#8 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Dispatcher/Controller.php(90): IPS\forums\modules\front\forums\_forums->add()
#9 /var/www/vhosts/testmy.net/httpdocs/ipb/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#10 /var/www/vhosts/testmy.net/httpdocs/ipb/index.php(13): IPS\_Dispatcher->run()
#11 {main}

 

After the last update nobody can post in my forum. Any ideas?

Link to comment
Share on other sites

  • Solution

I fixed it. Just added default values of "0" to the offending columns.

use ipb_database;

ALTER TABLE ipbforums_topics ALTER cache_sm SET DEFAULT 0;
ALTER TABLE ipbforums_topics ALTER cache_date SET DEFAULT 0;

describe ipbforums_topics;

 

... but maybe there are others in the database that need correcting. Can someone from Invision let me know? I'm sure you want to know about this bug I encountered too.

Normally I'd post something in the client area but it looks like you've removed my ability.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...