All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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 fields are still being processed on template even if they are within a speedy tag pair

Status Resolved
Add-on / Version Bloqs bloqs 4.10.2 and speedy 1.3.2
Severity
EE Version EE 6.1.6

Aasun Eble

Nov 16, 2021

It seems that if bloqs fields are inside a speedy fragment tag pair, all the bloqs fields still go through template processing ( I see it on the debugger and output Performance tab on the template)..  I’ve confirmed that the speedy fragment tag cache is written to the file system.  And, I’ve confirmed that the template DOES USE that cache fragment when the template is loaded.. BUT, all the bloqs fields on the template are still being processed (even though the speedy cache file is what is used as the output) and it’s killing the template load time.  If I use EE template caching, then the bloqs fields don’t do this.  Additionally, if I use bloqs native caching, then the bloqs fields are not part of the page load time..  But, I can’t use bloqs caching because of a different issue. 

I’ve confirmed speedy is properly installed and operating as expected throughout the site with content that is NOT bloqs fields. It’s like the bloqs fields are “escaping” themselves from the speedy tag pair.

#1

BoldMinded (Brian)

I don’t see how that’s possible. Have you recreated a very basic template with only the code in it to replicate the issue? And there is only a single Bloqs field on the page?

#2

BoldMinded (Brian)

After you recreate this share the template code you’re using, and a video describing the issue in detail.

#3

Aasun Eble

Comment has been marked private.

#4

Aasun Eble

Comment has been marked private.

#5

BoldMinded (Brian)

You need to move your fragment tag outside of the entries tag. The channel:entries method is still being called, and it must be triggering something within EE to call the field types. The only way to prevent this from happening is to wrap the entire channel:entries tag in a fragment tag and cache the whole thing. Not sure why you would only want to cache fields separately when you can cache the whole output. The channel:entries tag does a lot of stuff, so by not caching the channel:entries tag you’re asking EE to perform unnecessary queries.

#6

Aasun Eble

Hm.. Ok. well, that will cause me to have to refactor some things.. You’re only seeing a small piece of a larger template.

The reason I only want to cache “some” fields separately is because they have relationship data.. And, I don’t want to rebuild the cache for the entire page, when I can just rebuild the cache for a single field that is used on the page.

#7

Aasun Eble

I can just use native EE tag caching, then.. I don’t get the (super powerful) cache clearing rules that speedy allows me to use, then.

#8

BoldMinded (Brian)

As part of my debugging it looks like EE is trying to do some stuff that I can’t avoid, but I can’t exactly tell why it’s trying to parse the field. Either way, it doesn’t look like something I can work around.

#9

Aasun Eble

Ok. So, as a way I could still do my partial caches, I would just have to use a new channel:entries tag pair inside each of the speedy tags, right?

(As an alternative, if there was a way to add ids or keys to the bloqs fields tags to allow for multiple instances of the same bloqs field tags on the same template, then I could use the native bloqs caching, and I wouldn’t have to use speedy for these bloqs). 😊

#10

BoldMinded (Brian)

Try adding a unique parameter to each bloqs tag pair, e.g.

{bloqs cache_buster="field1"} ... {/bloqs}
{bloqs cache_buster="field2"} ... {/bloqs}

It creates the cache key based the entry, field id, and the parameters on the tag, not the contents of each tag itself.

#11

BoldMinded (Brian)

Or

{bloqs field="1"} ... {/bloqs}
{bloqs field="2"} ... {/bloqs}

It really doesn’t matter what the parameter is, just as long as they’re different.

#12

Aasun Eble

That. Totally. Works!

Thank you! Outstanding!

#13

BoldMinded (Brian)

I think b/c Bloqs is a tag pair the channel:entries tag attempts to do some pre-parsing. It looks like it would do the same thing if it were a Grid, Fluid, or Relationship field too.

#14

Aasun Eble

that’s really good to know.. There may be some other sites where I’m doing some segment caching (or other types of custom tag pair functions) that aren’t operating as I think.. This dev site has such a large amount of content and I’ve got tons of fields and some really complex template parsing layouts that I wasn’t seeing performance gains with caching, so I happened to catch it.

Thanks again for your help!

Login to reply