EE compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field.

ExpressionEngine.com licenses:

  • 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: Error on save for field using bloqs field type

Status Resolved
Add-on / Version Bloqs 4.6.0
Severity
EE Version 6.0.1

Stephen Galbraith

Jan 30, 2021

PHP Version: 7.3.11

First, there is a small styling issue under “Bloq Templates” - see image - appears to be a rendering issue.

On saving a new or editing a field where the fieldtype is Bloqs, the following error:

Argument 2 passed to BoldMinded\Bloqs\Database\Adapter::disassociateTemplateDefinitionWithField() must be of the type int, string given, called in user/addons/bloqs/ft.bloqs.php on line 920

user/addons/bloqs/Database/Adapter.php:893

I believe that this may relate to the saving of the Bloq Template. When I var_dump $templateDefinitionId it returns as undefined. Everything else saves accordingly, but there is no change to Bloq Templates.

if (is_array($templateDefinitionsDisassociate) && !empty($templateDefinitionsDisassociate)) {
            foreach (array_filter($templateDefinitionsDisassociate) as $order => $templateDefinitionId) {
                $adapter->disassociateTemplateDefinitionWithField(
                    $fieldId,
                    $templateDefinitionId
                );
            }
        }

Stack Trace:

#0 user/addons/bloqs/ft.bloqs.php(920): BoldMinded\Bloqs\Database\Adapter->disassociateTemplateDefinitionWithField(1, ‘undefined’)
#1 ee/legacy/libraries/api/Api_channel_fields.php(377): Bloqs_ft->post_save_settings(Array)
#2 ee/ExpressionEngine/Model/Content/FieldFacade.php(287): Api_channel_fields->apply(‘post_save_setti…’, Array)
#3 ee/ExpressionEngine/Model/Content/FieldModel.php(200): ExpressionEngine\Model\Content\FieldFacade->postSaveSettings(Array)
#4 ee/ExpressionEngine/Model/Content/FieldModel.php(163): ExpressionEngine\Model\Content\FieldModel->callPostSaveSettings()
#5 [internal function]: ExpressionEngine\Model\Content\FieldModel->onAfterUpdate(Array)
#6 ee/ExpressionEngine/Service/Model/Model.php(818): call_user_func_array(Array, Array)
#7 ee/ExpressionEngine/Service/Model/Query/Update.php(50): ExpressionEngine\Service\Model\Model->emit(‘afterUpdate’, Array)
#8 ee/ExpressionEngine/Service/Model/DataStore.php(275): ExpressionEngine\Service\Model\Query\Update->run()
#9 ee/ExpressionEngine/Service/Model/DataStore.php(240): ExpressionEngine\Service\Model\DataStore->runQuery(‘Update’, Object(ExpressionEngine\Service\Model\Query\Builder))
#10 ee/ExpressionEngine/Service/Model/Query/Builder.php(71): ExpressionEngine\Service\Model\DataStore->updateQuery(Object(ExpressionEngine\Service\Model\Query\Builder))
#11 ee/ExpressionEngine/Service/Model/Model.php(353): ExpressionEngine\Service\Model\Query\Builder->update()
#12 ee/ExpressionEngine/Model/Content/FieldModel.php(123): ExpressionEngine\Service\Model\Model->save()
#13 ee/ExpressionEngine/Controller/Fields/Fields.php(356): ExpressionEngine\Model\Content\FieldModel->save()
#14 [internal function]: ExpressionEngine\Controller\Fields\Fields->edit(‘1’)
#15 ee/ExpressionEngine/Core/Core.php(251): call_user_func_array(Array, Array)
#16 ee/ExpressionEngine/Core/Core.php(111): ExpressionEngine\Core\Core->runController(Array)
#17 ee/ExpressionEngine/Boot/boot.php(161): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#18 html/admin.php(144): require_once(’...’)
#18 html/admin.php(144): require_once(’...’)

 

#1

BoldMinded (Brian)

Feb 01, 2021

Thanks, I’ll try to replicate this today.

#2

Stephen Galbraith

Feb 05, 2021

Seems to have been addressed in build 827a9d02

Login to reply