Tagged: _aviaLayoutBuilderCleanData, cache, caching
-
AuthorPosts
-
September 16, 2014 at 2:03 pm #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.
September 16, 2014 at 5:16 pm #320009This reply has been marked as private.September 16, 2014 at 9:18 pm #320138This reply has been marked as private.September 17, 2014 at 6:45 pm #320664Please, I really need an answer to this!
September 17, 2014 at 7:19 pm #320679Hi!
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:
http://kriesi.at/documentation/enfold/working-with-the-advanced-layout-builder/Regards,
JosueSeptember 17, 2014 at 7:33 pm #320684Hey!
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 ;)
Cheers!
KriesiSeptember 17, 2014 at 7:48 pm #320688This reply has been marked as private.September 17, 2014 at 8:01 pm #320694This reply has been marked as private.September 17, 2014 at 9:12 pm #320732Hi 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());
Regards,
JosueSeptember 17, 2014 at 11:06 pm #320779This reply has been marked as private.September 18, 2014 at 2:29 pm #321194Hi!
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 http://kriesi.at/contact
Cheers!
DevinSeptember 28, 2014 at 5:00 pm #326171Hi,
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.
Thanks,
KenneyUPDATE: ‘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", $_REQUEST['_aviaLayoutBuilderCleanData'], $post_id ) ); } } );
-
AuthorPosts
- The topic ‘_aviaLayoutBuilderCleanData keeping data old’ is closed to new replies.