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: After enabling nesting, the order of the bloqs seems to impact whether an error is thrown.
Status | Resolved |
Add-on / Version | Bloqs 4.2.1 |
Severity | |
EE Version | 5.3.0 |
Adam Skiles
Feb 26, 2020Once I enabled nesting in my bloqs field, I started getting the following error.
An error occurred a nested Bloq field, probably because you forgot to add the {close:[block_name]}{/close:[block_name]} tag pair. Please refer to the documentation.
We talked briefly on Slack and you mentioned that I needed to add the close tag to all the bloqs, which I did, but still had the same issue, so I started messing around with the fields. If I put some field into ‘draft’ status, it would work, but when I brought them out of draft status it wouldn’t - it seemed very random. I checked the fields, and even with fields having the exact same settings - some would throw the error, some would not.
Through more testing, I think I finally tracked the issue down to not being so much as what is in the bloq field, or its settings, but where it is located. I can have a content field (Wygwam) second in the order and it will throw an error - but if I move that content field first in the list, the page will display fine.
Adam Skiles
Feb 26, 2020
Comment has been marked private.
Adam Skiles
Feb 26, 2020
Comment has been marked private.
BoldMinded (Brian)
Feb 26, 2020
What is this?
Shouldn’t it be?
Adam Skiles
Feb 26, 2020
Oops - that was just a bad copy/paste.
Note: I have reduced the template to nothing but the code example provided in the field type and still have the same issue.
Adam Skiles
Feb 26, 2020
Another interesting tidbit I just noticed while looking at the code…
I have 8 blocks in an order that is currently working in the following order…
- content
- counselor search
- call to action
- media group
- media group item
- media group item
- media group item
- media group item
The code is currently showing…
- content
- counselor search
- call to action
- media group
- media group item
- media group item
- media group item
- media group item
- content (the surrounding code, but no actual content in it).
Even if I put the actual content block in draft status, I still get this showing up.
Is it possible that ‘page_block_content’ as the field name and ‘block_content’ as a bloq field are interfering with each other somehow?
Adam Skiles
Feb 26, 2020
Disregard the last message. I am still having an issue, but that last bit was template related. Sorry!
BoldMinded (Brian)
Feb 26, 2020
So this only happens, regardless of block order, when any block in the list is in draft state?
Adam Skiles
Feb 27, 2020
I hadn’t made that connection - I thought it had to do with the nesting, but after testing, yes, I believe you are correct.
Nesting seems to work completely fine until I start putting bloqs into draft status, at which point, it may error the page out based off the order of the bloqs.
BoldMinded (Brian)
Feb 27, 2020
Ok, cool. Thanks for confirming. That gives me something to focus in on, hopefully it’s an easy fix.
Adam Skiles
Feb 28, 2020
One other thing to note that I just ran into on the live site. You don’t even have to have any bloqs nested. If the nesting option is simply turned on, and you throw a bloq into draft status, it can cause this error.
BoldMinded (Brian)
Mar 02, 2020
Just an update on this. I’ve tried to replicate it, but I can’t. I’m going to create additional blocks in my local environment and give it another go today or tomorrow.
BoldMinded (Brian)
Mar 02, 2020
Yeah, I still can’t replicate this. https://d.pr/i/JWWb8O
using the following template code
Adam Skiles
Mar 06, 2020
Hmm. Well that’s not what I wanted to hear. I’ll try and dig deeper and see if maybe it’s related to a specific field, third-party add-on, etc.
Adam Skiles
Mar 06, 2020
I believe I may have tracked down the issue to incorrect siblings being returned. I modified line 289 in TreeHelper.php to only return siblings not in draft status (&& $block->isDraft() != TRUE) and the page stopped error out, and displayed.
I’m not a PHP guru by any means, so I can’t say if this will effect anything else or if the problem is actually somewhere else and this just inadvertently took care of it for this specific case.
BoldMinded (Brian)
Mar 08, 2020
This has been resolved and will be included in the next Bloqs release (probably 4.2.3)