Be sure to checkout our newest add-on Speedy!

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: Nestable bloq field not nestable in control panel

Status Resolved
Add-on / Version Bloqs 4.2.2
Severity
EE Version 5.3.0

eHealth Ontario

Mar 23, 2020

Nestable property is not working on the first bloq field in a channel. See attached screenshots for all the possible test cases I have attempted. The value of $this->settings is empty after the $controller->displayField call. Not sure what is in that function that causes the issue.

$nestable = isset($this->settings['nestable']) ? $this->settings['nestable'] : 'n';
            $viewData = $controller->displayField(
                $entryId,
                $blockDefinitions,
                $blocks
            );

Sorry, I cannot share a development environment. If you need any other info, let me know.

#1

BoldMinded (Brian)

Mar 24, 2020

As far as nesting goes, I’m unable to replicate it. Two fields on the page seem to allow nesting just fine.

I am seeing an issue where blocks in the 2nd field are not saving, which I thought I fixed a couple versions ago.

#2

BoldMinded (Brian)

Mar 24, 2020

The issue with the 2nd field not saving is related to Publisher, not Bloqs, so I don’t think it is related to your issue.

#3

BoldMinded (Brian)

Mar 24, 2020

I would suggest checking your JS console to see if there are any errors.

#4

eHealth Ontario

Mar 25, 2020

There was no error in JS console. JS is working as expected as it is getting value for ‘fieldSettingNestable’ as ‘n’;

I have further tracked down the issue:
Maybe it is related to EE or configuration: On file, system\ee\legacy\libraries\api\Api_channel_fields.php Line 350

$this->field_types[$field_type]->_init(array(
    'settings'  => $settings,
    'field_id'  => $field_id,
    'field_name' => $field_name
   ));

Values of
$field_type = ‘bloqs’
$settings = array(0)
$field_id = false
$field_name = false

$this->field_types[$field_type] already has proper values. The _init function resets them. I will follow up with EE support to find out the cause.

#5

eHealth Ontario

Mar 25, 2020

The above call originates from the file system/user/addons/bloqs/libraries/EEBlocks/Controller/FieldTypeManager.php
There was an exception for blocks. I added bloqs to that exception and everything seems to work as expected.

// the module can't load any views. So, don't let setup_handler be
        // called on blocks.
        unset($fieldtypes['blocks']);
        unset($fieldtypes['bloqs']);
#6

BoldMinded (Brian)

Mar 26, 2020

So you’re saying adding that second unset() line fixed the issue?

#7

eHealth Ontario

Mar 26, 2020

Yes and so far I have not noticed any side effects. I have been adding new bloq fields and made lots of changes to existing entries.

#8

BoldMinded (Brian)

Mar 26, 2020

Interesting. Not entirely sure what the issue was but it works for me too with that change. I’ll include that change in the next release. Thanks for investigating. If anything else comes up just let me know.

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.