• Resolved Codevz

    (@codevz)


    Hi,

    WP Optimize sometimes have conflict with Elementor dynamic CSS generated files. After I clear cache, everything works fine.

    Regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi there,

    Could you try excluding Elementor’s dynamic CSS files from the WP-Optimize cache and let me know if that helps?

    Looking forward to hearing back!

    Best regards,

    Thread Starter Codevz

    (@codevz)

    Yes problem solved when I excluded dynamic CSS files.

    • This reply was modified 1 year, 6 months ago by Codevz.
    Thread Starter Codevz

    (@codevz)

    But whats next step? Should I keep excluding dynamic CSS files generate by Elementor?

    Why your plugin not checking Elementor page changes to keep the latest dynamic file in the minified version of CSS? Now Elementor have over 10 million active installs and I’m sure people have no time to submit ticket to you about this situation and will installs another caching plugin.

    Plugin Support vupdraft

    (@vupdraft)

    The whole point of dynamic elements is that they change. Caching is not suitable for items that are created dynamically. This would be true in any plugin.

    WPO caches in the following situations (which by the way is identical to other caching plugins like WP Rocket)

    Full cache purge:

    • When changing/updating current themes and parent themes (of child themes)
    • When changing/updating current plugins
    • When turning off the cache feature in WP-Optimize
    • When editing widgets
    • When saving the customizer settings
    • When updating a menu
    • When Autoptimize purges its cache
    • When updating permalink structure
    • When changing cache settings
    • When updating string translations in WPML plugin
    • When updating the ‘posts_per_page’ option
    • When purging Avada theme’s fusion caches
    • When saving any of GetWooPlugins’ settings (Premium)

    Partial cache purge:

    • When you publish new content or update/edit existing content, the cache for that post/page will be cleared, as well as associated content (category archives, blog archives)
    • When comments are approved, or their status changes
    • When terms are created or updated
    • When changing/updating stock quantity of WooCommerce product or product variation
    • When updating the ‘page_on_front’ option
    • When updating ‘page_for_posts’ option
    • When updating the ‘URLs to exclude from caching’ WP-Optimize caching configuration
    • When trashing a post
    • When running importers
    • When WooCommerce product is on sale (Premium)
    Thread Starter Codevz

    (@codevz)

    Thanks for your full explanation, But I’m not talking about dynamic elements CSS, I’m talking about page dynamic CSS generated by Elementor and yes Elementor only generates CSS on page create/update.

    I know WPO have filter to clear cache on every page update and there is no problem with that and working fine.

    But after a while (for example after a week) I checked one of my website pages and saw page CSS broken and only Elementor dynamic CSS is not in the minified CSS file generate by WPO, It seems some where automatically Elementor generated all CSS files again but WPO doesn’t notified about that. This is why I opened a ticket here.

    I hope you get my explanations. Please let me know if its not clear to you.

    Plugin Support vupdraft

    (@vupdraft)

    It sounds like you need to regenerate the CSS via Elementor > Tools > Regenerate CSS on your WordPress Dashboard

    Plugin Support vupdraft

    (@vupdraft)

    Try adding the following using a snippets plugin.

    add_action('save_post', 'clear_elementor_cache');
    
    function clear_elementor_cache() {
      // Check if Elementor is loaded and the hook has fired
      if ( did_action( 'elementor/loaded' ) ) {
      // Automatically purge and regenerate the Elementor CSS cache
        \Elementor\Plugin::instance()->files_manager->clear_cache();
      }
    }
    Thread Starter Codevz

    (@codevz)

    Thanks for your help and time, but its not the good solution, Actually problem is not related to Elementor or save_post, because I didn’t updated pages for a while and problem occurred automatically.

    Just with the following string I added into exclude CSS files field to prevent them from minify problem solved.

    /elementor/css/post-

    FYI, Cache lifespan was to 1 Day.

    • This reply was modified 1 year, 5 months ago by Codevz.
    • This reply was modified 1 year, 5 months ago by Codevz.
    Plugin Support vupdraft

    (@vupdraft)

    Thank you for sharing your solution. It really is very helpful for me and to other users.

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

The topic ‘Elementor’ is closed to new replies.