Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Exception Caught on channel form submit when file field in it.
Status | Resolved |
Add-on / Version | Publisher 2.8.3 |
Severity | |
EE Version | 3.5.16 |
pixi
Jun 28, 2018Hi Brian,
I have a new issue with Channel Forms (editing existing entries) and don’t know for sure if it is related with publisher. Anyway there are only two things mentioned in the error message : publisher and channel forms.
This error occurs when I try to edit entries by channel form. When I submit the form I get this error (but if I go to the entry I can see that the changes made have been saved.)
Exception Caught
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_id_8_hidden_file' in 'field list':
UPDATE `exp_channel_data` SET `field_id_3` = '', `field_id_4` = '', `field_id_5` = '', `field_id_6` = '', `field_id_7` = '', `field_id_42` = '', `field_id_8` = 'https://boldminded.com/assets/add-ons/g4w8xo9/publisher/logo1.png', `field_id_10` = 'My intro.', `field_id_11` = ' ', `field_id_12` = 'http://www.google.com', `field_id_13` = 'https://www.linkedin.com/company/google-?', `field_id_14` = 'https://www.facebook.com/google', `field_id_15` = 1, `field_id_16` = 'Jean-Pierre Gonzague', `field_id_39` = 'Louvain-la-Neuve, Court-Saint-Etienne, Corbais', `field_id_17` = '', `field_id_18` = '', `field_id_19` = '', `field_id_20` = '', `field_id_45` = '', `field_id_21` = '', `field_id_22` = '', `field_id_23` = '', `field_id_24` = '', `field_id_25` = '', `field_id_31` = '', `field_id_32` = '', `field_id_41` = '', `field_id_26` = '', `field_id_27` = '', `field_id_28` = '', `field_id_29` = '', `field_id_46` = '', `field_id_33` = '', `field_id_44` = '', `field_id_47` = '', `field_id_50` = '', `field_id_51` = '', `field_id_52` = '', `field_id_53` = '', `field_id_54` = '', `field_id_55` = '', `field_id_56` = '', `field_id_57` = '', `field_id_58` = 0, `field_id_59` = '', `field_id_60` = '', `field_id_61` = '', `field_id_63` = '', `field_id_64` = '', `field_id_65` = '', `field_id_66` = '', `field_id_67` = '', `field_id_68` = '', `field_id_69` = '', `field_id_70` = '', `field_id_71` = 0, `field_id_72` = '', `field_id_73` = '', `field_id_74` = '', `field_id_75` = '', `field_id_76` = '', `field_id_77` = '', `field_id_78` = '', `field_id_79` = '', `field_id_80` = '', `field_id_81` = '', `field_id_82` = '', `field_id_83` = '', `field_id_84` = 0, `field_id_85` = '', `field_id_86` = '', `field_id_8_hidden_file` = 'logo1.png', `field_id_8_hidden_dir` = '7', `field_id_8_directory` = '7', `field_id_8_existing` = '' WHERE `entry_id` = 3
ee/legacy/database/drivers/mysqli/mysqli_connection.php:122
Stack Trace: hide details
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(137): CI_DB_mysqli_connection->query('UPDATE `exp_cha…')
#1 ee/legacy/database/DB_driver.php(297): CI_DB_mysqli_driver->_execute('UPDATE `exp_cha…')
#2 ee/legacy/database/DB_driver.php(203): CI_DB_driver->simple_query('UPDATE `exp_cha…')
#3 ee/legacy/database/DB_active_rec.php(1572): CI_DB_driver->query('UPDATE `exp_cha…')
#4 user/addons/publisher/Service/Entry/Entry.php(526): CI_DB_active_record->update('channel_data', Array)
#5 user/addons/publisher/Service/Entry/Entry.php(284): BoldMinded\Publisher\Service\Entry\Entry->cleanup(Object(BoldMinded\Publisher\Model\EntryTranslation))
#6 user/addons/publisher/ext.publisher.php(457): BoldMinded\Publisher\Service\Entry\Entry->save(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array)
#7 ee/legacy/libraries/Extensions.php(243): Publisher_ext->after_channel_entry_save(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array)
#8 ee/legacy/libraries/Extensions.php(138): EE_Extensions->call_class('Publisher_ext', 'after_channel_e…', Array, Array)
#9 [internal function]: EE_Extensions->call('after_channel_e…', Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array)
#10 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(642): call_user_func_array(Array, Array)
#11 [internal function]: EllisLab\ExpressionEngine\Service\Model\Model->EllisLab\ExpressionEngine\Service\Model\{closure}('after_channel_e…', Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array)
#12 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(615): call_user_func_array(Object(Closure), Array)
#13 [internal function]: EllisLab\ExpressionEngine\Service\Model\Model->EllisLab\ExpressionEngine\Service\Model\{closure}()
#14 ee/EllisLab/ExpressionEngine/Service/Event/Emitter.php(153): call_user_func_array(Object(Closure), Array)
#15 [internal function]: EllisLab\ExpressionEngine\Service\Event\Emitter->emit('afterSave')
#16 ee/EllisLab/ExpressionEngine/Library/Data/Entity.php(630): call_user_func_array(Array, Array)
#17 [internal function]: EllisLab\ExpressionEngine\Library\Data\Entity->emit('afterSave')
#18 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(834): call_user_func_array('parent::emit', Array)
#19 ee/EllisLab/ExpressionEngine/Service/Model/Query/Update.php(60): EllisLab\ExpressionEngine\Service\Model\Model->emit('afterSave')
#20 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(294): EllisLab\ExpressionEngine\Service\Model\Query\Update->run()
#21 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(260): EllisLab\ExpressionEngine\Service\Model\DataStore->runQuery('Update', Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#22 ee/EllisLab/ExpressionEngine/Service/Model/Query/Builder.php(83): EllisLab\ExpressionEngine\Service\Model\DataStore->updateQuery(Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#23 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(366): EllisLab\ExpressionEngine\Service\Model\Query\Builder->update()
#24 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(198): EllisLab\ExpressionEngine\Service\Model\Model->save()
#25 ee/EllisLab/Addons/channel/libraries/channel_form/Channel_form_lib.php(1802): EllisLab\ExpressionEngine\Model\Content\ContentModel->save()
#26 ee/EllisLab/Addons/channel/mod.channel.php(5394): Channel_form_lib->submit_entry()
#27 ee/legacy/libraries/Actions.php(220): Channel->submit_entry()
#28 ee/legacy/libraries/Core.php(546): EE_Actions->__construct(true, Object(Closure))
#29 ee/legacy/controllers/ee.php(64): EE_Core->generate_action(true)
#30 [internal function]: EE->index('modifier', '3')
#31 ee/EllisLab/ExpressionEngine/Core/Core.php(189): call_user_func_array(Array, Array)
#32 ee/EllisLab/ExpressionEngine/Core/Core.php(94): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#33 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#34 index.php(175): require_once('...')
#34 index.php(175): require_once('...')
I have to say that It worked before. The only thing that changed since is : MySql has been upgraded on the server from 5.1 to 5.6 and I installed Visitor (from DevDemon) but I uninstalled VIsitor to see if it fixes the issue but it doesn’t.
Thanks in advance for your answer.
BoldMinded (Brian)
The problem is the query contains this:
but the exp_channel_data table does not have those columns. I do not know why the query is attempting to update those non-existent columns though. I’m guessing those are in the $_POST array when the channel:form is submitted. Are you saving the entry in channel:form as a draft or as open/published?
BoldMinded (Brian)
Can you share with me the channel:form tag you’re using so I can try to replicate this locally?
pixi
As open.
BoldMinded (Brian)
Can you test this without the file field in the form and see what happens?
BoldMinded (Brian)
Open your publisher/Service/Entry/Entry.php file and go to line 488. Change it to this and see if it saves correctly.
pixi
Sorry for the delay. Perfect! It works like a charm now 😉 thank you.
I encountered 2 other ??bugs?? (including another with channel forms) but I’m going to open new tickets for this matter.