Skip Navigation

[Resolved] There’s a bug when using Layouts plugin with the Elementor Builder

This thread is resolved. Here is a description of the problem and solution.

Problem:
Whenever you use the Elementor Builder Plugin and a Layout with several Visual Editor Cell, the content of the Elementor Builder will be repeated as many times as there are Visual Editor Cells in the Layout.

Solution:
The Development team decided this is not a BUG in Layouts but has to be solved with Custom Code.

This is the solution:

1. We are providing a filter to easily turn off the filter when needed:

apply_filters( 'ddl_apply_the_content_filter_in_cells', true, $this )

2. The best solution is to use this custom solution which you can apply when you really need it (you can even define it based on conditions), in functions.php:

add_filter( 'ddl_apply_the_content_filter_in_cells', 'my_override_to_content_filter' );
 
function my_override_to_content_filter( $bool, $cell ){
    $content = $cell.get('content');
 
    if( strpos( $content, 'find me') ){
        $bool = false;
    }
 
    return $bool;
}
This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 7 replies, has 4 voices.

Last updated by Mohammed 6 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#505772

I am trying to:
I'm using the Toolset Starter Theme with Layouts and Elementor.
I just noticed what I think is a bug. When a page built with Elementor is using a layout, if there is more than one Visual Editor cell in the layout, the content created with elementor for that page is repeated in each Visual Editor cell.

For now, the workaround is to use Visual composer instead (but I prefer Elementor) for building my pages or to replace the Visual editor cells by text widgets whenever it's possible.

I hope that this could be fixed easily. If anyone from the toolset team member could test layouts with the free version of Elementor (I personally use the free version), it would be nice.

#505869

This is quite a common issue, due to the Post Body applying filters.

In case you call the Post Body in one of those Cells, can you try to re-insert it with the GUI, and choose to "suppress third party filters"?
This will produce a ShortCode like this:

[wpv-post-body view_template="None" suppress_filters="true"]

Usually that solves the problem.

If not, please provide in the next reply a updated version of that Plugin, and some instructions how to use it, so I could eventually escalate it to the Compatibility Team to have a look at it.

Thank you, and enjoy your Weekend!

#505959

hi Beda, thank you for your help. however, I was using a post content cell to import the content of the page, and not a visual editor cell with the post body. So I had one post content cell and several visual editor cells with various contents. As I said in my previous message, the result of this is that the post body is repeated in all the visual editor's cells and in the post content cell.

Nevertheless, I tried with your method, I replaced my content cell with a visual editor cell with post body and checked the "suppress third party filters". I ended with the exact same result.

So i provide a link to the elementor plugin: hidden link it's a visual builder, it works quite like the front end editor of visual composer. please let me know if you need more informations but you can find several videos on the website link I provided.

#506105

I see the issue.

The problem is that the Visual Editor Content is simply overwritten by Elementor's content.

Interesting is that this seems to happen only with the Visual Editor Cell.

If you insert as example a Views Cell, this is not replaced.

I got to escalate this to our DEV team.

Thank you for your patience, this will take a while to solve.

#511483

The Development team decided this is not a BUG in Layouts but has to be solved with Custom Code.

This is the solution:

1. We are providing a filter to easily turn off the filter when needed:

apply_filters( 'ddl_apply_the_content_filter_in_cells', true, $this )

2. The best solution is to use this custom solution which you can apply when you really need it (you can even define it based on conditions), in functions.php:

add_filter( 'ddl_apply_the_content_filter_in_cells', 'my_override_to_content_filter' );

function my_override_to_content_filter( $bool, $cell ){
    $content = $cell.get('content');

    if( strpos( $content, 'find me') ){
        $bool = false;
    }

    return $bool;
}
#512107

Awesome, thank you, I'll try this. I mark this issue as resolved. thank you very much Beda.

#520646

Hi,
Can you tell me where i insert the code that it works on every page?
After a Update is the code also available?

#551943

Hi Jens,

You can add this code to the active theme functions.php file
It's a filter that we don't intend to remove it from our plugin. so, yes, it will be available after Layouts update.

Thanks.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.