• Resolved jbstate

    (@jimburkestate)


    We use your plugin on several instances and it works great. We are now adding a new instance on WPVIP and they have a process that concatenates CSS files. This process is running into an issue as described by them below. Because of the issue the settings page for your plugin is very distorted. Is the change listed below possible without impacting others or do we need to focus on the custom code they provided to us?

    I have identified the issue. The import at the top of https://cdev2.sites.ca.gov/wp-content/plugins/disable-comments/assets/css/style.css is not being parsed by the VIP concatenation script properly, creating invalid css for everything that follows.
    Specifically, the concatenation script is not expecting the ; in the @import declaration, which leads to an incomplete line being left in the CSS, and invalidating everything that follows.
    If you go to https://cdev2.sites.ca.gov/wp-admin/network/settings.php?page=disable_comments_settings&concat_css=false, the page will render the way you expected with the parameter of concat_css as false. To exclude this style sheet from the concatenation, please add the following code near where you enqueue the style sheet and commit the changes.
    add_filter( 'css_do_concat', function( $do_concat, $handle ) {
        if ( 'disable-comments-style' === $handle ) {
            return false;
        }   
        return $do_concat;
    }, 10, 2);

    More information here: https://docs.wpvip.com/technical-references/vip-platform/file-concatenation-and-minification/

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Abid Hasan

    (@abidhasan112)

    Hi @jimburkestate ,

    Thanks for reaching out to us.
    We will need to test and R&D deeply in different servers and environments before implementing this on our plugin. We will check and research this in the future don’t worry.

    For now, I would recommend you to add their given custom code to your functions.php to get this done in your case.

    Thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘Import declaration’ is closed to new replies.