• Resolved ivoasap2022

    (@ivoasap2022)


    Hi!

    I’m currently using Beaver Builder (version 2.9+, latest) with the VamTam Consulting theme(Latest version) . I’m trying to completely disable the generation of cached CSS/JS files by fl-builder-layout and instead render all builder assets inline in the page’s HTML.

    To achieve this, I’ve added the following filters to my theme’s functions.php:

    add_filter(‘fl_builder_render_css_inline’, ‘__return_true’);
    add_filter(‘fl_builder_render_js_inline’, ‘__return_true’);
    add_filter(‘fl_builder_cache_enabled’, ‘__return_false’);

    This seems to partially work — I can see that some assets are rendered inline. However, each time I create or update a page, Beaver Builder still generates layout-specific cache files inside the following directory:

    /wp-content/uploads/bb-plugin/cache/

    For example, I see:

    /wp-content/uploads/bb-plugin/cache/8864-layout.css
    /wp-content/uploads/bb-plugin/cache/8864-layout.js

    Is there a way to fully suppress these *-layout.css and *-layout.js cache files?

    Best regards!

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

    (@pross)

    Firstly, where did you get those three filters from?

    Thread Starter ivoasap2022

    (@ivoasap2022)

    Hi Simon,

    I have actually tried different solutions regarding this. According to the official documentation, these filters should fix the problem, but unfortunately, they didn’t work for me.

    add_filter( 'fl_builder_render_assets_inline', '__return_true' );
    add_filter( 'fl_is_debug', '__return_true' );

    Plugin Author Simon Prosser

    (@pross)

    The docs say to go to the advanced settings and at the bottom is a toggle to render css/js inline, we added that option for people that have no control over their caching.

    The three filters you originally posted are not part of any code in the plugin, chatGPT?

    Thread Starter ivoasap2022

    (@ivoasap2022)

    I have already enabled the option to render CSS/JS inline, but cache files are still being created whenever I add elements using the builder.

    Yes, the first three filters were from ChatGPT, sorry about that — I missed them in the rush.
    They were incorrect. Sorry for the mistake.

    Plugin Author Simon Prosser

    (@pross)

    When you view the page though, are the assets inline or not?

    Thread Starter ivoasap2022

    (@ivoasap2022)

    The ones from vamtam-theme-options and from my custom.css are loaded directly on the page. However, those generated based on the page ID are loaded in the cache folder:

    /wp-content/uploads/bb-plugin/cache/8864-layout.css
    /wp-content/uploads/bb-plugin/cache/8864-layout.js

    Plugin Author Simon Prosser

    (@pross)

    I’ll try again and word it differently:

    When you view the page, are the assets loaded inline or are they urls to the uploads folder? Might help if you share the url.

    Thread Starter ivoasap2022

    (@ivoasap2022)


    The ones with the cache are loaded via <link> or <script> element:

    <script type=”text/javascript” src=”https://my-site-example.com/wp-content/uploads/bb-plugin/cache/5352-layout.js?ver=29ba1ba209c90c26cd5300b58e1a5c49&#8243; id=”fl-builder-layout-5352-js”>

    <link rel=’stylesheet’ id=’vamtam-front-all-css’ href=’https://my-site-example.com/wp-content/themes/vamtam-consulting/vamtam/assets/css/dist/all.css?ver=1677486337&#8242; type=’text/css’ media=’all’ />

    But there is inline css as well:

    <style id=”vamtam-theme-options”>
    :root {–vamtam-site-max-width:1260px;–vamtam-body-background-background-image:none;–vamtam-body-background-background-color:#ffffff;–vamtam-body-background-background….
    .
    .
    </style>

    Is there any connection to the fact that I updated the plugin from 2.5.2.3 to the latest version?

    • This reply was modified 11 months, 1 week ago by ivoasap2022.
    Plugin Author Simon Prosser

    (@pross)

    2.5.2.3 was release nearly 4 years ago, there have been 1000s of changes since then.

    Without seeing the site I cant tell if the inline code is working and I cant see if you are just seeing insane caching. What did the vantam people say?

    Thread Starter ivoasap2022

    (@ivoasap2022)

    I think it’s related to the theme. After changing the theme and following the instructions to render CSS/JS inline in the advanced settings, the cache files disappeared.

    Plugin Support Danny

    (@dannyholt)

    Hi @ivoasap2022

    Can you confirm if the issue is resolved and if not, can you reach out to our helpdesk with a link to this topic, please.

    https://www.wpbeaverbuilder.com/contact/

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Unable to disable CSS/JS cache’ is closed to new replies.