Beaver Builder + Tangible template : fetch wrong post content ID

Hi,

Since the last release, I’ve detected a huge regression.
I use Tangible template in custom posts types layouts powered by Beaver Builder+Themer.

Here is the context :

I have a custom Beaver Themer layout attached to my custom post type. In this layout, I have a Beaver Builder HTML module containing this shortcode [template id=200].
In this Tangible template id=200, I have something simple :

<div id="content"><Field content /></div>

Before the 30 dec 2022 release, for a post_id=1, the Tangible Template displayed correctly the content of post_id=1

After the release, the same Tangible Template in the same custom post (id=1) displays the content of post_id=2 … for no reason !!!

I had to find a quick fix before a patch release. Here is the solution I found :

In my BB module I changed my Tangible Template shortcode with this : [template id=200 post_id="[wpbb post:id]"]
and in my Tangible Template I’ve added the loop tag to force getting the current post id :

<Loop id="{Get local=post_id}">
<div id="content_alt"><Field content /></div>
</Loop>

It seems that your loops scope have changed - or broked - so I have to force it. Could you fix it please ?

Best
Guillaume

Not sure if this is related, but I also have a problem with <Field content /> albeit not on the front end.

My Beaver Themer Single Template for posts shows post content and “Other Stuff”.

To display the post content I have a Tangible Template module that includes <Field content />.

The front end looks right, but not the preview while in Beaver Themer. Instead of showing the post content, the preview for the TT module shows the content of the Beaver Themer template itself (i.e. the Other Stuff) stripped of formatting.

This only happens with <Field content /> If I leave that out, I can show any other kind of field which previews properly.

Hope that helps.

1 Like

Thanks for the input. In my case, once <Field content /> is loaded trough a Tangible template without a “forced loop” for the current post in my BB single layout, the main content and all other content modules loaded after this field and displayed in the post frontend (i.e Gravity Forms dynamic fields based on the post content) are not coming from the current post but from another random one… so strange.

Should be quickly investigated by the L&L team, I guess. @eliot

Hi Guillaume, I’ve tried testing this in a few different ways and I’m not able to replicate the issue you’re describing. I made a themer layout where the only thing contained in the custom layout was a shortcode that ran an L&L template that contained the exact same content as in your example (<div id="content"><Field content /></div>). When I run it, I get a grid of the content from all my posts in the correct order as I’d expect. Do you think you could provide me with some more details about what’s going on on your particular site that seems to be causing this? Here are a few things you might be able to clarify or test:

  1. You mentioned that before the update, your template “displayed correctly the content of post_id=1”. Could you explain what that post_id piece means? Are you referring to the actual post ID or to some variable or field called post_id?

  2. If you’re referring to the post ID, do you mean that the number is always one number off? Like when it’s supposed to display the post with an ID of 56 is it instead displaying the post with an ID of 58? Or just the next available post?

  3. Could you also check whether this issue also occurs when you just have BB+L&L installed? Sometimes third-party plugin conflicts are to blame so I’d love to rule that out.

Hi Benjamin,

Thanks for your reply and investigation.
Here are my answers and debug tests results :

  1. When I speak about “post_id” I mean post ID. Sorry for the confusion
  2. Not always one number off but sort of a random post ID
  3. Plugin conflict : you had right, I’ve detected the plugin who caused this error. It is Powerpack for Beaver Builder and more precisely the content grid module.

In short, my layout contains :

  • Header
    • Title of the custom post type
    • Image + content of the custom post type (powered by Tangible and called in a BB HTML module)
    • A Gravity Form with dynamic fields based on the post custom fields (powered by ACF Pro and Gravity Perks)
    • A Powerpack content grid module which displays other similar content excluding the current post.
  • Footer

When I deactivate the Powerpack plugin or when I remove the content grid module in the layout, the error don’t show anymore.

When I keep the Powerpack Content Grid module in my layout and don’t force the loop for current post ID in my Tangible template, <Field content /> takes the ID of the first post of the Powerpack Content Grid instead of the current post.

Do you need a copy of this plugin in order to investigate ?

Best
Guillaume

Thanks for looking into that. Good to know it’s not a conflict with native Beaver Builder and seems to be something to do with how PowerPack might be modifying the default query of the page. I just tried installing PowerPack and adding a Content Grid module to a page, and I still seem to be able to use L&L to display fields from the current post. If you add a default Content Grid module to your page, does that still cause the issue you’re seeing? Or is there some specific setting in the Content Grid module you’ve added (some query setting or something for example) that seems to cause this bug to occur?

I’m also curious about this:

You mentioned in your most recent reply that Gravity Forms is “powered by ACF Pro and Gravity Perks.” Am I to understand that when you add both a PowerPack Content Grid module and an L&L template to your Themer Layout, data on the page that’s being added by other plugins unrelated to those two (like your Gravity Form) is being affected? But if you remove either the L&L template or the PowerPack module, then your Gravity Form is being displayed correctly?

If you could clarify that, that might help me to replicate the issue, since I still don’t seem to be able to do that. It might also be helpful if you’d be willing to send us some admin credentials to a staging version of your site that the devs might be able to use to identify what might be causing this. You can send your credentials to me/us here along with some links to the affected pages/themer layouts.

One minor thing: you mentioned that your image and CPT content is “powered by Tangible and called in a BB HTML module.” Is there a reason you’re working with the shortcode this instead of using the Tangible Template module? I’m not sure if this would make a difference in the issue you’re running into, but I’m curious.

On an unrelated note, I just realized that apparently I can’t calculate 56+1 haha: