Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1188763

    Background Summary: I’ve used Enfold for many clients for many years, always use latest version of WP and Theme. Congrats on building something that works well, has been very reliable, and is always updated.

    Issue Research: Making changes to a page in the Advanced Layout Builder (ALB) and clicking the Update button saves the changes to the database posts table successfully (and shows in Revisions), but NOT to the postmeta ‘_aviaLayoutBuilderCleanData’ field, and then the theme seems to be pulling from that field to display the page, which displays an old version of the page, not from the posts post_content field like normal. I’ve verified using Chrome Dev Tools that the POST submission has all the posts and postmeta fields with correct values containing the updates made, and gets a 200 success response, but the postmeta CleanData field is not updated for some reason.

    Multiple Updates are made, and if using the Block Editor, clicking Update says it works, but displays the old version, and reloading the Editor page causes all those changes to be LOST. We’ve lost hours of work due to this issue. Changing the page status from Draft to Published seems to help for some reason. Cloning the page does not help.

    I have tried multiple servers, migrating a site from one to another, same issue. Disabled all plugins, disabled all caching, same issue. It does not happen on all pages, but even removing sections of the page don’t seem to help, once it’s not working, it stops updating.

    Interestingly, if I delete the ‘_aviaLayoutBuilderCleanData’ field value in the database, then the page updates ok, and the page displays ok. It doesn’t seem to recreate it right away either… a few updates work ok, then once it recreates it, it doesn’t display any updates made again, and the issue is back.

    I searched and found many posts with similar issues, but most seem to be either certain text or sections or characters cause it to break, such as the special character replacement noted in the docs, and that’s a shame, the text should be escaped or something. If it’s parser related, it’s only affecting the CleanData field value, which is the problem. Upon failing to update, it should delete that field then, so it falls back to displaying from the posts post_content field like a normal site would

    I have created a workaround that seems to solve the issue completely, and this code can be placed in the functions.php of a child theme, or as I prefer, use the Code Snippets plugin and have it fire only in the Admin:

    function fix_for_enfold_page_builder( $post_ID, $post ) {
      $page_builder_active = get_post_meta( $post_ID, '_aviaLayoutBuilder_active', true );
      $page_builder_shortcode_tree = get_post_meta( $post_ID, '_avia_builder_shortcode_tree', true );
     
      if ( $page_builder_active && $page_builder_shortcode_tree ) {
        update_post_meta( $post_ID, '_aviaLayoutBuilderCleanData', $post->post_content );
      }
    }
    add_action( 'wp_insert_post', 'fix_for_enfold_page_builder', 10, 2 );

    I would suggest Enfold stop using ‘_aviaLayoutBuilderCleanData’ completely, as it’s very concerning when updates show in Revisions and in the Editor, but are not actually used for the display of the content, that’s a major bug and no matter the cause, storing two versions of a page is bound to have issues and cause problems, not to mention take up twice as much space in the database.

    #1188769

    I’ll include login info in the Private Content area of this post so you can see the issue in action on a specific page that refuses to update unless I enable my workaround code.

    Also note, I’ve also enabled Debug mode, and tried No Parsing, check shortcodes, and Auto-repair mode, none of them show any errors that I see or make a difference.

    #1232786

    I am having this issue as well. I wish we could disable the use of _aviaLayoutBuilderCleanData. It’s redundant, and proves that there is issues with the avia layout builder.

    #1233205
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.