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: Bloqs inside EE Partial not working, but raw in template do.

Status Resolved
Add-on / Version Bloqs 4.0.18 (you working version from ticket today)
Severity
EE Version 5.1.2

Neil Evans

Jan 22, 2019

Okay, i have 10 or so bloqs fields - i hold them in a partial, and then use that partial inside the field tags so i can reuse them in other templates.
This works for 10 fields, but i occassionally come across fields that simply do not work. I then move those tags from the partial to the originalo template and they work fine.

Example: This works when direct between the template tags

{bloqs_field}
{narrow_row}
    <div class="row narrow">
    {close:narrow_row}
    </div>
    {/close:narrow_row}
{/narrow_row}
{/bloqs_field}

Example: This fails when the separate partials file is loaded.

{bloqs_field}
    {bloqs_partial_file}
{/bloqs_field}

bloqs_partial_file.html

{narrow_row}
    <div class="row narrow">
    {close:narrow_row}
    </div>
    {/close:narrow_row}
{/narrow_row}

When testing… be sure to use same field name “narrow_row” as others i use “full_width_row”, “row”, “column”, “galler_row” all work fine! Reserved word maybe?

#1

BoldMinded (Brian)

I’m going to go out on a limb and suggest it has something to do with the file and or field naming and prefixes. See if this has anything to do with it. https://github.com/ExpressionEngine/ExpressionEngine/issues/55

#2

Neil Evans

Hi Brian, Thanks for the reply - This was my initial thought as i have had this before with “block” and “blocks” field names. However, why would this occur for a partial and be fine when direct in the template? Unless, it could be the way it is pulled in to the parsing order?

The field and prefix issue has been around a long time, i think i remember it on another clients site way back when! So i imagine it was not an easy fix for them back then!

#3

Neil Evans

Hi Brian I tried the modified code in the EE bug mentioned above - and it did not change or fix the issue. The same result occured. N

#4

BoldMinded (Brian)

Partials are placed into the template before any fieldtypes, plugins/module tags are parsed, so there should be no difference in if the code is in a partial or a template tag. I’ll try to replicate this locally when I get a chance, but I have a feeling there is something else awry b/c I know people have put Bloqs template tags in partials before without issue.

#5

BoldMinded (Brian)

I tested several variations of block field code in partials and couldn’t replicate it, it works fine with fields are in partials. I know other customers use partials with Bloqs fields so I’m guessing there is something off with your environment, or template code that you may not be seeing.

#6

BoldMinded (Brian)

I’m going to close this ticket as I don’t think it is a bug. I and others have used partials/snippets in Bloqs fields without issue. I’m guessing there is some other parsing issue with your template code that is causing the behavior.

Login to reply