the webserver host recently changed/upgraded cpanel, and all of my EE installations made it through fine except for one
the website is fine displaying any posts that have been made, but upon trying to save any new post i get this error:
SQLSTATE[HY000]: General error: 1364 Field ‘field_id_10’ doesn’t have a default value:
INSERT INTO exp_channel_data
(channel_id
, site_id
, field_ft_6
, field_ft_8
, field_ft_19
, field_ft_65
, field_ft_197
, field_ft_278
, field_ft_303
, field_ft_443
, field_id_303
, field_id_6
, field_id_8
, field_id_65
, field_id_278
, field_id_197
, field_id_19
, field_id_443
, entry_id
) VALUES (‘55’, 1, ‘xhtml’, ‘xhtml’, ‘none’, ‘none’, ‘none’, ‘none’, ‘none’, ‘none’, ”, ‘sdfg’, ‘sdfg’, ”, ‘sddfg’, ”, ”, ”, ‘6756’)
ee/legacy/database/drivers/mysqli/mysqli_connection.php:114
Stack Trace: Please include when reporting this error
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query('INSERT INTO `ex...')
#1 ee/legacy/database/DB_driver.php(260): CI_DB_mysqli_driver->_execute('INSERT INTO `ex...')
#2 ee/legacy/database/DB_driver.php(175): CI_DB_driver->simple_query('INSERT INTO `ex...')
#3 ee/legacy/database/DB_active_rec.php(1297): CI_DB_driver->query('INSERT INTO `ex...')
#4 ee/ExpressionEngine/Service/Model/Query/Insert.php(70): CI_DB_active_record->insert('channel_data')
#5 ee/ExpressionEngine/Service/Model/Query/Update.php(93): ExpressionEngine\Service\Model\Query\Insert->actOnGateway(Object(ExpressionEngine\Addons\Pro\Model\Channel\Gateway\ChannelDataGateway), Object(ExpressionEngine\Addons\Pro\Model\Channel\ChannelEntry))
#6 ee/ExpressionEngine/Service/Model/Query/Insert.php(38): ExpressionEngine\Service\Model\Query\Update->doWork(Object(ExpressionEngine\Addons\Pro\Model\Channel\ChannelEntry))
#7 ee/ExpressionEngine/Service/Model/Query/Insert.php(27): ExpressionEngine\Service\Model\Query\Insert->doWork(Object(ExpressionEngine\Addons\Pro\Model\Channel\ChannelEntry))
#8 ee/ExpressionEngine/Service/Model/DataStore.php(275): ExpressionEngine\Service\Model\Query\Insert->run()
#9 ee/ExpressionEngine/Service/Model/DataStore.php(230): ExpressionEngine\Service\Model\DataStore->runQuery('Insert', Object(ExpressionEngine\Service\Model\Query\Builder))
#10 ee/ExpressionEngine/Service/Model/Query/Builder.php(79): ExpressionEngine\Service\Model\DataStore->insertQuery(Object(ExpressionEngine\Service\Model\Query\Builder))
#11 ee/ExpressionEngine/Service/Model/Model.php(362): ExpressionEngine\Service\Model\Query\Builder->insert()
#12 ee/ExpressionEngine/Model/Content/ContentModel.php(219): ExpressionEngine\Service\Model\Model->save()
#13 ee/ExpressionEngine/Controller/Publish/AbstractPublish.php(442): ExpressionEngine\Model\Content\ContentModel->save()
#14 ee/ExpressionEngine/Controller/Publish/Publish.php(304): ExpressionEngine\Controller\Publish\AbstractPublish->saveEntryAndRedirect(Object(ExpressionEngine\Addons\Pro\Model\Channel\ChannelEntry))
#15 [internal function]: ExpressionEngine\Controller\Publish\Publish->create(55)
#16 ee/ExpressionEngine/Core/Core.php(266): call_user_func_array(Array, Array)
#17 ee/ExpressionEngine/Core/Core.php(122): ExpressionEngine\Core\Core->runController(Array)
#18 ee/ExpressionEngine/Boot/boot.php(161): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#19 index.php(151): require_once('...')
#19 index.php(151): require_once('...')
Hrm- I’m betting the database wasn’t running in strict mode and now it is.
BUT certainly in EE6 I’d expect it to run fine in strict mode. So I’m wondering if there’s something a bit odd with the data.
What kind of field is field_id_10? Does it have content? Wonder if there’s any way it’s a ‘stray’ left behind from a delete or some such.
If you look at your exp_channel_data table, what are the settings for that field_id_10 row?
years back i had removed the NGEN image add-on, but something is still left in there, i’m sure that’s what’s causing this.
There is no instance of the program in add-ons, long gone. i have upgraded many times since
i had the warnings that the weird fields from Ngen were “there” but it wasn’t causing a problem like this until the server CPANEL was upgraded. all other installations of EE went thru it fine.
I’d see what field_id_10 is - look in exp_channel_fields - what’s the type? If it’s an old ngen field that’s totally moot- back up the database, and … ok, I’d probably just change the type to text so it still exists. But you could probably remove it- but then may need to remove the column in exp_channel_data if it exists.
OR if there IS no field with id 10 in that table… could make one and set it to text, then go remove it via EE. That’s probably what I’d do so you don’t have to worry with straggling data remainders in the db.
But definitely- db backup!
i just upgraded to the 6.4.10 and in control panel got this message:
The following fieldtypes are found in the database, but are not actually installed properly. This will cause issues with editing channels, fields, and entries. To resolve this, either install the missing addons or remove the fields from their tables.
ngen_file_field (exp_matrix_cols, exp_matrix_cols)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.