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 Nesting Level Limit?

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

Neil Evans

Jun 19, 2018

Description:
Is there a nesting level limit, that causes issues with multiple children under one parent?
I am running ROW -> COLUMN -> CONTENT + CONTENT without any issues.
However, when i am trying ROW -> COLUMN -> SLIDESHOW -> SLIDE + SLIDE i seem to break it!
Note though ROW -> COLUMN -> SLIDESHOW -> SLIDE   without the second slide child works fine

ERROR:
Undefined offset: 37
user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php, line 309

This seems to refer to: $historyData = $this->EE->session->cache[‘blockHistory’][$prevSibling->getId()];
Which makes me assume it is a depth and history issue. But i am unsure.


I know i am pushing limits, and i can use a simple grid/table within the slideshow level… But i ideally wanted a bit more control…
Thanks, Neil

 

#1

BoldMinded (Brian)

Hi, Neil. I’m not aware of any depth issues. I tested multiple levels deep and it worked fine. Can you provide more information about your nesting settings for each of those blocks?

#2

Neil Evans

ROW - Any Level, Children allowed COLUMN - Cannot be root, Parent ROW only, Children allowed SLIDESHOW - Cannot be root, Parent COLUMN only, Children allowed SLIDE - Cannot be root, Parent SLIDESHOW only, Children not allowed

Note it works fine when i have only one slide in the slideshow. But when i add the second, that is when the error arises.

I have continued testing by putting SLIDESHOW into ROW direct, and add multiple slides beneath that. And that fails too… So it cannot be a levels thing. SO i am thinking an error on my side. But having deleted and reproduced… i cannot replicate. Is there a field name length issue? I’ll keep testing, but any gotchas from your side is appreciated.

#3

BoldMinded (Brian)

Screenshots of each would be easier to consume.

#4

Neil Evans

Hi Brian, Was in the process of doing this, as i guessed as much. Sent over in email, as i cannot add here it seems.

Cheers, N

#5

Neil Evans

HI Brian The other ticket you are working on, multiple relationships - this is firing up the same error line and file that i am… Just tagging as it might be related.

N

#6

BoldMinded (Brian)

You mean this one? https://boldminded.com/support/ticket/1766

#7

Neil Evans

Correct yes. The undefined offset is a different number…

But this is identical: user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php, line 309

#8

BoldMinded (Brian)

What does your template code look like to output this Bloqs field?

#9

BoldMinded (Brian)

Comment has been marked private.

#10

Neil Evans

{body}

{row}
 <div class="{background_color:value}">
 {close:row}
 </div>
 {/close:row}
{/row}

{column}
 <div class="{column_width:value}_col">
 {close:column}</div>{/close:column}
{/column}

{tests}
 <div>
  {tests_title}
 {close:tests}</div>{/close:tests}
{/tests}

{test}
 {test_title}
{/test}

{/body}
#11

Neil Evans

Just uploading new files now. Will test.

#12

Neil Evans

Same error, but new line - guessing somehting had been tweaked!

Notice Undefined offset: 43 user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php, line 310

#13

BoldMinded (Brian)

Even, do you happen to have any blocks with the same name as a template partial?

#14

Neil Evans

Comment has been marked private.

#15

BoldMinded (Brian)

I’m not sure why you’re getting these errors, but it is a bit odd. Most of this code is unit tested and I’ve had hardly any bug reports dealing with it, although you’re the 2nd person today who has reported a similar issue, which is even more odd. I setup a quick test again locally and this is what I have, and its working as intended.

https://www.dropbox.com/s/k0q65z2obwro9tk/Screenshot 2018-06-19 18.26.22.png?dl=0

Template code

<style>
    .bloqs div {
     border: 1px solid #222;
        padding: 1em;
    }
    </style>
    <div class="bloqs">
    {bloqs}
        {section}
         <div>
            {heading}
            {close:section}
            </div>
            {/close:section}
        {/section}
        {row}
         <div>
            {heading}
            {close:row}
            </div>
            {/close:row}
        {/row}
        {grid}
            {simple_grid}
            {/simple_grid}
        {/grid}
        {slide}
         <div>
            {heading}
            {close:slide}
            </div>
            {/close:slide}
        {/slide}
        {slideshow}
         <div>
            {heading}
            {close:slideshow}
            </div>
            {/close:slideshow}
        {/slideshow}
    {/bloqs}
    </div>

Output

https://www.dropbox.com/s/4wyg1ni4j6jin4z/Screenshot 2018-06-19 18.28.40.png?dl=0

<div class="bloqs">
    
         <div>
            Section
            
        
         <div>
            Row
            
        
         <div>
            Slideshow
            
        
         <div>
            Slide 1
            
        
            </div>
            
         <div>
            Slide 2
            
        
            </div>
            
            </div>
            
            </div>
            
            </div>
            
         <div>
            Section 2
            
        
         <div>
            Row 2
            
        
         <div>
            Slideshow 2
            
        
         <div>
            Slide 3
            
        
            </div>
            
         <div>
            Slide 4
            
        
            </div>
            
         <div>
            Slide 5
            
        
            </div>
            
            </div>
            
            </div>
            
            </div>
            
    </div>
#16

Neil Evans

Hi Brian, i 100% agree… I have not had issues on my other site. (previous versions), and agrtee the code is solid.

Whats worse, is i have removed row and column from the equation and the issue still occurs! It is 100% not a depth issue.

I have started dumping out code, to see if i can debug the issue, as i think it must be this end somehow. And when i dump $tagdata at line 247 in TagController.php

I appear to get an extra version of my bottom level tag. So in your case above, in slideshow2 - you have 3 slides, but i appear to be getting 4 template tags for it. That is not right, and hopefully something for me to look into.

N

#17

Neil Evans

Hi Brian, 3 images sent over by email.

1 - Shows the blocks, with only 3 children 2 - The simplified template code 3 - The 4 tags being output for the 3 blocks.

I think this is where my error comes from. It is effectively trying to find content for a 4th element, which is null and failing. How, why and what - i have no idea. But it is the starting point for me to investigate i think.

Its gone 1am here now, so i will start again tomorrow!

N

#18

Neil Evans

Think i have solved it. It is not Bloqs. i think it is EE and how they are searching tags when replacing them on line 227 TagController.php

I think they are partially matching and then messing up “test” and “tests”. As when i changed them to “test_aaa” and “tests_xxx” i solved the problem. It might be a change in new EE or just because we are not prefixing etc…

But found at least… if you want to take it to EE you can, i cannot be bothered!

#19

BoldMinded (Brian)

This sounds familiar now. I think this has come up once before where blocks are of similar names/prefixes. Glad you sorted it out… not sure if there is anything I can do on my end but I’ll take a look into it.

Login to reply