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: Issue trying to use the same bloqs in different fields on the same channel.

Status Resolved
Add-on / Version Bloqs 4.0.5
Severity
EE Version 4.3.1

Nick Johnson

Aug 21, 2018

Description:
I am banging my head up against the wall with this one, Brian. I have a client who wants to be able to control his content per region (various regions across the globe). I currently have 13 bloqs created to meet his needs and have create a field for each region that contains these bloqs. So…a single channel includes four fields, each of which have the same exact bloqs tied to them. Below is an example of the code being used to include the bloqs fields.

{if "{repeatable_content_asia:total_blocks}" > "0"}
      {repeatable_content_asia}
            {tp_repeatable_content}
      {/repeatable_content_asia}
{if:else}
      {repeatable_content}
            {tp_repeatable_content}
      {/repeatable_content}
{/if}

If the ‘repeatable_content’ field is used (the first field using bloqs that was created), then everything works fine. If, however, ‘repeatable_content_asia’ is the one to display, the bloqs aren’t getting parsed and just the code comes through.

I am wracking my brain trying to figure out why one works, but the other does not, even though it is using the exact same bloqs, code, etc. The template partial being embedded is currently 261 lines or code and I don’t think there are any issues with that as, as I said, it works completely fine if called through ‘repeatable_content’.

Any help would be much appreciated.

 

#1

BoldMinded (Brian)

Have you thought about using Publisher (or Transcribe) to serve content to regions instead of duplicating fields like that?

First, review this ticket and see if its a similar issue: https://boldminded.com/support/ticket/1752

#2

Nick Johnson

Well…the client is going to need to control content via language as well, which is what I was going to use publisher for, but they will need to be able to separate the two - regions will control what content is displayed and language more of how it is displayed. Also, regions are not a one to one relationship with language (more many to many), which is why I didn’t think that using Publisher for all of it would work (though I would be open to suggestions).

I reviewed that ticket briefly, but it doesn’t seem to be the same issue. This was a fresh install (not an upgrade), and the code does work with one of the bloqs fields, just not all of them.

#3

BoldMinded (Brian)

I’ll have to try to replicate this locally to see if its a wide spread issue or if there is something up with your environment. Can you try it without the template partial to at least rule that out?

#4

Nick Johnson

Yessir. I previously tried it without the template partial as well as without the conditionals. I have stripped it down all the way to not using a wrapper and simply having the needed code on the page and it still didn’t work.

#5

Nick Johnson

Comment has been marked private.

#6

BoldMinded (Brian)

So you stripped it down to not use a partial, have you tried just putting a single text field block into each Bloqs field to see what happens? e.g.

{if "{repeatable_content_asia:total_blocks}" > "0"}
      {repeatable_content_asia}
            {basic_block}
                  {basic_input_text_field}
            {/basic_block}
      {/repeatable_content_asia}
{if:else}
      {repeatable_content}
            {basic_block}
                  {basic_input_text_field}
            {/basic_block}
      {/repeatable_content}
{/if}
#7

Nick Johnson

Comment has been marked private.

#8

Nick Johnson

Or do I need to working on a different way to implement this?

#9

BoldMinded (Brian)

It sounds like you may be hitting a memory limit of some sort. Bloqs uses a lot of native EE parsing code, and works very similarly to Grid, so while I’m not saying it’s not a Bloqs issue, but it may not be. It’ll be hard to know. Have you tried starting at the bottom and removing template code for each block one at a time to see if it consistently stops working at the same point? Or maybe try to isolate a specific block of template code that may be causing the problem by process of elimination?

Have you tried increasing the php memory limit?

#10

Nick Johnson

I have tried isolating a particular block, but it provides erratic results. I have not tried increasing the member limit. Since it’s not a quick fix I think I’m going to try coming at the problem from a different angle and see if a different approach will be a better solution. Thank you for your help, Brian. If I can’t come up with another solution maybe we can revisit?

I don’t have a lot of time to troubleshoot and was just hoping I had done something stupid that I missed (though maybe I did by setting it up this way??).

#11

BoldMinded (Brian)

If you were already going to use Publisher I would recommend adding a language for each language/region you have. You can use the ISO language codes such as “en-gb”, which is English UK or “en-us”. Then turn on Publisher’s setting that uses the browser language setting to determine what to set the language to upon first visit. If it matches the ISO code then it’ll set the language and region. Each language also has Locale field that you can use to set the Open Graph locale meta tags, e.g

<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="zh_CN" />
#12

BoldMinded (Brian)

Nick, review this bug report and see if it may be what you’re running into.

https://expressionengine.com/support/bugs/23706/bug-in-get_pair_field-method

#13

BoldMinded (Brian)

Nick, just checking in. Did you get a chance to see if the issue you’re seeing is similar to the bug report in comment #12?

#14

BoldMinded (Brian)

I’m closing this ticket. Its been almost a month with no reply.

Login to reply