B8: Bug - Looper consumer: Text element with Excerpt dynamic content breaks looper

In a grid that is providing a loop of posts of a certain category, I have the cells consuming this loop, and within the cell is various elements pulling in the featured image, the title, links to the permalink etc. There is also a text element that is pulling in the excerpt with this code: {{dc:post:excerpt length="10"}}.

Everything works perfectly in Pro, as shown below:

However on the front-end, rendering seems to be stopped abruptly at the text element, so that even the button element just below it does not get rendered (and all other content on the page, including non-looper sections, does not get output):

Thanks! Will check into this and confirm here.

To add to the above, I have found that this issue only occurs on Looper Providers / Consumers in Pages. I have no trouble using the Excerpt dynamic content tag in the Layout builder. Just to add some further context / detail to the issue if that helps!

Thanks for the extra context! Very helpful. I’ve not investigated this one just yet but that does confirm a suspicion I have. The content builder works slightly differently and I have an idea of what’s going on.

1 Like

Fixed for next patch. It was related to how the Content builder manages element data differently than other builders. Retrieving the excerpt was overriding the current post, and element data beyond that point was being corrupted… all working now!

2 Likes

I have tried this in Pro 4.0.0 and it looks that the length parameter is being ignored in {{dc:post:excerpt length=“xx”}} code. It is the same for every use of the code, not only in posts/post element.

Hi @Marcin_Podwojski,

I’ve tried this out using The Excerpt element and also Posts Minimal. I tried a few different length values and it’s always working for me. If you want I can check it out on your site. Just open a new thread and add some login credentials in a secure note. Thanks!

@alexander
I have investigated on my end and it looks that the length parameter is only ignored for Manual Excerpts. Is there a way to make it work? I need the excerpts to have different length on home page (where I have 4 recent posts only) and the regular blog page (with all blog posts). Before Pro 4.0 I was using The Grid plugin to achieve that.

@Marcin_Podwojski Thank you! You’re right, it wasn’t applying to manual excerpts. Fixed this for the next point release.

I think the length parameter on the excerpt should be expected to trim all forms of excerpts since you might need different ones for different designs. Then the excerpt_length WordPress filter can still be used to override the default WordPress generated excerpt length (defaults to 55 words).

1 Like