• With pervious version of Beaver Builder I was able to programmatically change the image URL in the post table and in the postmeta table (_fl_builder_draft and _fl_builder_data records) and then clear the caches using delete_asset_cache_for_all_posts() and clear_all_css_cache(). However, something has changed and now it is necessary to go into edit mode and click the Publish button for the change to fully take affect. What other functions could be called to finalize the change made to the page without editing it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Simon Prosser

    (@pross)

    clear_all_css_cache is a Beaver Builder *Theme* function, it will not do anything for css generated for layouts created by the Beaver Builder plugin.

    You have a few choices.

    1. WP-cli if you are on the commandline.
    2. FLBuilderModel::delete_asset_cache_for_all_posts(); will delete css/js for all your layouts
    3. FLBuilderModel::delete_all_asset_cache( $postid ); will delete for a specific page/layout.

    I hope you are not directly editing that data, it is serialised and very easy to break.

    Thread Starter AlanP57

    (@alanp57)

    Yes, I am unserializing and serializing that data when editing it. I’ve added delete_all_asset_cache function to my code but still the change to the posts and postmeta records is not taking affect. I still have to edit and republish the page to see the change.

    Plugin Author Simon Prosser

    (@pross)

    Perhaps you are using one or more caches and publishing clears those caches.

    Thread Starter AlanP57

    (@alanp57)

    I understand. I’ve cleared the browser cache but there was no change. There is not a cache running on the site. Is there anything else in Beaver Builder that can be cleared?

    Plugin Author Simon Prosser

    (@pross)

    Nope.
    The two functions I provided clear the css and js files that are created, they do not _clear any caches_

    If can provide a link to the page I might be able to tell you more.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image not appearing after programmatically updating the image URL’ is closed to new replies.