Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Dynamic.css loading problem #161800
     Trey
    Participant

    I’ve been trying to track this down as well for the last couple of weeks. It seems completely random, none of the settings screens are open when it happens. We don’t have any caching plugins, and the directory is writable by wordpress. I guess something is triggering the file to be regenerated and the front end is getting loaded at that precise moment, before the file is finished saving. It seems that this could be easily fixed in the dynamic-css.php file by adding a file_exists check to the wp_is_writable check on line 29.

    In the interim, I’ve just added this to my child theme, so far so good.

    COPY CODE
    if ( ! is_admin() && has_action( 'wp_enqueue_scripts', 'kleo_load_dynamic_css' )) {
        global $kleo_config;
        if(!file_exists(trailingslashit( $kleo_config['custom_style_path'] ) . 'dynamic.css')){
            remove_action( 'wp_enqueue_scripts', 'kleo_load_dynamic_css', 22 );
            add_action( 'wp_head', 'kleo_custom_head_css' );
        }
    }
Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?