• Resolved alexschoerg

    (@alexschoerg)


    Hi,

    I was stuck for long time, since I needed to exclude a CSS file from being combined and excluded from having the query parameters removed. Looked into source code and found a bug. Please have a look yourself to check.

    What I have done is adding 2 Filters (for the same CSS):

    add_filter( ‘sgo_css_combine_exclude’, function ( $excludeList ) {
    $excludeList[] = ‘my-file-handle’;
    return $excludeList;
    } );
    add_filter( ‘sgo_rqs_exclude’, function ( $excludeList ) {
    $excludeList[] = ‘part-of-file-name’;
    return $excludeList;
    } );

    The bug is now in Css_Combinator.php:
    * Line 185 adds file name to exclusion list in form of /path/to/css, WITHOUT query params
    * Line 223 would correctly removes the query strings to have an equal check, but if you have remove query params on and want to exclude a file, this method skips the removal of the query params of the file.
    * Line 225, bc of skipping in remove_query_strings, line 225 checks against WHOLE path, incl. query params, which is not string equal.

    This leads to a condition, where the file is not combined, and not loaded anymore. But I have not looked into why this happens, only observed that css is missing.

    Thanks, Alex

Viewing 1 replies (of 1 total)
  • Plugin Support daniellaivanova

    (@daniellaivanova)

    Hello @alexschoerg,

    Thank you for your feedback. The issue has been reported to the plugin developers. While we cannot specify when it will be reviewed, you can check the plugin’s changelog for updates on the matter.

    Best Regards,
    Daniela Ivanova

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.