• Resolved backpackingseries

    (@backpackingseries)


    Hi,

    Thanks for this really helpful plugin. Since the last update, there’s been a string of records in the PHP error Log file

    [07-Feb-2021 04:26:58 UTC] PHP Warning:  preg_match(): Unknown modifier '/' in /wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/CombineCss.php on line 394
    [07-Feb-2021 04:26:58 UTC] PHP Warning:  preg_match(): Unknown modifier '/' in /wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/CombineJs.php on line 557

    Anything that I could do to fix this please?

    Kind regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • Got exactly the same today (both).

    same here

    Plugin Author Gabe Livan

    (@gabelivan)

    @felipelungov @dsl225 @backpackingseries I’ve released the development version which has a fix to avoid that error, so please update the version you’re currently using.

    Here’s how you can do it: https://www.assetcleanup.com/docs/how-to-get-the-development-version-of-asset-cleanup/

    Now, I strongly believe it was because you had something written in the textarea for the exclusion of files from being combined that wasn’t alright. Now, even if the regular expression was invalid (perhaps you meant to write a string that will match exactly), it shouldn’t generate the error as it’s frustrating indeed to have it logged-in all the time to the error_log file.

    I have a request from you, can you please reply to this topic with the value you have in the textarea for both of the following: “Do not combine the CSS files matching the patterns below (one per line):” & “Do not combine the JavaScript files matching the patterns below (one per line, see pattern examples below):“. I would like to check what you’ve written here.

    Thanks Gabe,

    In the CSS box I have this:

    (.*?).min.css
    /plugins/wd-instagram-feed/(.*?).css
    /plugins/forminator/(.*?).css

    and the JS has this:

    (.*?).min.js
    /plugins/wd-instagram-feed/(.*?).js
    /themes/corporate-plus-pro/assets/
    /plugins/forminator/
    /plugins/google-language-translator/js/
    /plugins/easy-accordion-free/

    Thanks for your reply @gabelivan .

    Here is what I have for CSS:

    /plugins/wd-instagram-feed/(.*?).css

    For JS:

    /plugins/wd-instagram-feed/(.*?).js

    I guess we found the culprit. I’m removing those lines for now as I’m not even using that plugin.

    Thread Starter backpackingseries

    (@backpackingseries)

    Thank you @gabelivan

    On my site, the option/s for CSS Files Minification and JavaScript Files Minification are disabled. But in the respective grayed out boxes for CSS and JS, I see the following default values:

    CSS: Do not minify the CSS files matching the patterns below (one per line):

    (.*?)\.min.css
    /plugins/wd-instagram-feed/(.*?).css

    JS: Do not minify the JavaScript files matching the patterns below (one per

    line):

    (.*?)\.min.js
    /plugins/wd-instagram-feed/(.*?).js

    However, the following options are enabled and specify the assets as follows:

    Combine loaded CSS (Stylesheets) into fewer files

    /plugins/wd-instagram-feed/(.*?).css

    Combine loaded JS (JavaScript) into fewer files

    /plugins/wd-instagram-feed/(.*?).js

    PS: Like others have mentioned, I too do not have the wd-instagram-feed plugin installed on my site.

    Kind regards,

    Guys, the entry with “wd-instagram” is just an example that is inserted in those boxes by default by the plugin first install in order to display how those entries should be used.

    It’s not an error and is not related to the current issue.
    You may leave this as it is.

    Plugin Author Gabe Livan

    (@gabelivan)

    @dsl225 @backpackingseries @felipelungov based on my tests, it looks like there’s a bug there because of double delimiters (#) used at some point, just as the error says it. So, the values you had there were okay. They would not trigger the error. Moreover, the default values for exclusion related to “wd-instagram-feed” were there for a long time and so far they have been working fine.

    So, I’ve updated the development version which has the fix. Please read how to get it here – https://www.assetcleanup.com/docs/how-to-get-the-development-version-of-asset-cleanup/ – and let me know if you’re still getting any errors reported after that. You shouldn’t!

    Many thanks!

    Thanks! Just uploaded the development version, will check on Monday if I’m still getting those warnings.

    No more warnings with the development version. Already updated to the newest version that I see also includes this fix. Thanks @gabelivan !

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘PHP Error Log – Preg Match’ is closed to new replies.