Hi @RichardC, I split this post out of the previous thread since, as you said, it doesn’t pertain to relationship loop pagination. I added a title based on my understanding of your issue but feel free to change that if necessary. I’ve managed to replicate the issue and it seems like it doesn’t only happen when you add a template that contains an acf_relationship loop to a BB layout; it also seems to happen any time you add an L&L tag that references a field that exists on the post to which the template will be applied but does not exist on the pot template itself (e.g. adding
<Field image /> to the page broke the preview since there’s no image field on a template, but
<Field title /> didn’t break the preview since there is a title field on both the template and the post to which the template will be applied). I assume @eliot is going to need to be involved in addressing this.
Here’s what I’ve found out about this on my own little test site. I’ve got a CPT called “My second course” and a BB layout called “ACF Relationship test”. When I add a basic post loop (
<Loop type=post><Field title /><br /></Loop>), the BB layout preview page shows the two posts I have on my little testing site as you’d expect, followed by the content of the “My second course” page that I’m previewing:
However, when I create an acf_relationship loop in the Tangible Template, I’m seeing the following occur:
- The page content that used to be previewed from the “My second course” page is now just showing up as “Content Area.”
- The text before and after the acf_relationship loop appears correctly, but not the contents of the relationship loop. The contents of the loop appear on the front end, but not on the preview.
- The part of my L&L template that contains
<Field title /> is replaced by the title of my BB layout (“ACF Relationship test”) instead of the title of the page I’m trying to preview. I’m not sure if this is the expected behaviour for L&L, but it seems like L&L is taking its context from the BB layout instead of the page that’s selected in the BB “Preview As:” dropdown. This might not be related to the reason that BB’s preview is breaking, but I thought I’d mention it just in case.
Thanks for pointing this out, we’ll see what we can do to address this!