Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #319844

    Is there a reason why Enfold seems to put posts/page data into this _aviaLayoutBuilderCleanData storage which overrides post_content field? I am guessing there is a good reason, but I cannot figure it out and it is maddeningly frustrating when working with changing data (outside of WordPress editor). We have a site with hundreds of pages and it seems like despite changes in the database table content, it does not want to use those changes. It is almost like it is a caching mechanism, which could be a very useful feature. But, at the present, it is creating havoc for us.

    Is there a way to shut this off, or temporarily disable it? It is making it almost impossible to work with the site when we are making large changes to the content.

    This reply has been marked as private.
    This reply has been marked as private.

    Please, I really need an answer to this!



    That’s because those posts are built with the Advanced Layout Builder, if you don’t want the _aviaLayoutBuilderCleanData postmeta to get stored with your posts you’d need to switch back to the normal editor and rely on manual shortcodes only.

    More info:




    Yes there is a reason. adding content and relying only on the text editor to save all the shortcodes often times lead to problems with formating. Problems were mainly caused by the wordpress autop function which ads paragraphs and line breaks were they are not supposed to be. I probably could have cleaned that up with another regular expression but felt it would be less prone to errors to simply save the data in a separate field ;)


    This reply has been marked as private.
    This reply has been marked as private.

    Hi Jason!

    You could make pages get the direct content instead of the _aviaLayoutBuilderCleanData postmeta (at your own risk), open template-builder.php and look for line 22:

    $content = apply_filters('avia_builder_precompile', get_post_meta(get_the_ID(), '_aviaLayoutBuilderCleanData', true));

    Change it to:

    $content = apply_filters('avia_builder_precompile', get_the_content());


    This reply has been marked as private.


    Not sure if it would be viable or not in this case. Almost anything you have in mind could be added in with a filter or with a small modification to the theme.

    The way the builder data is saved to pages is one we discussed way way back internally. If I remember right the issue came down to the complexity of the shortcodes and user error. A single missed bracket would mean an entire page gets corrupted so moving it to another field hidden by default from the user and stored separately means that the pages are a bit harder to break.

    Moving to a new theme later would be as difficult as moving to any new theme for a custom built site in my opinion. The images, text, and data would need to be completely reorganized since the entire theme would change. The post data would remained untouched and its why the layout builder is disabled there.

    Kriesi doesn’t often jump on the forums so if you want to talk to him directly you would need to try




    Are there any plans to at least keep the post_content synchronized to the _aviaLayoutBuilderCleanData meta value (which can easily be done on saving the post/page)?

    Also, it’s too bad that wp doesn’t take the post format into account when applying content filters; otherwise using a custom format would’ve solved it.


    UPDATE: ‘Preview Changes’ on a page shows an empty page as it uses post_content; I added this to the child theme’s functions.php to fix this:

    // save the post content in post_content; enfold only stores it in postmeta _aviaLayoutBuilderCleanData.
    add_action( 'post_updated', function($post_id) {
      if ( !empty( $_REQUEST['_aviaLayoutBuilderCleanData'] ) && empty( $_REQUEST['content'] ) )
        global $wpdb;
        $wpdb->query( $wpdb->prepare(
          "UPDATE $wpdb->posts SET post_content = %s WHERE ID = %d",
        ) );
    } );
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘_aviaLayoutBuilderCleanData keeping data old’ is closed to new replies.