• Resolved jamminjames

    (@jamminjames)


    Getting this error when using WordPress File Upload with Fast Velocity Minify:

    PHP Fatal error: Cannot declare class MatthiasMullie\Minify\Minify, because the name is already in use in /home/sites/xxxxxx/www/wp-content/plugins/wp-file-upload/vendor/minifier/minify/src/Minify.php on line 26

    This plugin is using the minification library from: https://github.com/matthiasmullie/minify, and FVM also includes that library as well.

    It seems there should be an “if” statement to “not include that library” if it’s already defined somewhere else, OR rename it so it doesn’t conflict with other plugins.

    I posted about this on the Fast Velocity Minify support page, and the FVM author said, “I have posted on their support forum a fix, however it depends on the author to implement it or not, or you could do that change yourself.”

    He also noted that while testing WordPress File Upload on a default wordpress install, with only the default 2019 theme and no other plugins, that there are other errors on the console log: https://prntscr.com/n3osif.

    Do you think these things will be addressed soon?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nickboss

    (@nickboss)

    Hi, the developer of Velocity Minify contacted me and notified me about this incompatibility. I will put a fix in the next release of the plugin.

    Meanwhile, put the following code inside functions.php file of your theme:

    if ( isset($GLOBALS["WFU_GLOBALS"]["WFU_MINIFY_INLINE_CSS"]) ) $GLOBALS["WFU_GLOBALS"]["WFU_MINIFY_INLINE_CSS"][3] = "false";
    if ( isset($GLOBALS["WFU_GLOBALS"]["WFU_MINIFY_INLINE_JS"]) ) $GLOBALS["WFU_GLOBALS"]["WFU_MINIFY_INLINE_JS"][3] = "false";

    With this code the plugin will be forced not to use minification, so it will not cause conflict hopefully.

    Regarding the console errors on the default WordPress install, I did not notice them in my environment. If you have more information on this, or you experience the same errors in your website let me know.

    After the next release coming in a few weeks you will not need the above code anymore.

    Regards

    Nickolas

    Thread Starter jamminjames

    (@jamminjames)

    Great, thanks, Nickolas!

    Plugin Author nickboss

    (@nickboss)

    You are welcome.

    Nickolas

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with Fast Velocity Minify, using same minify library’ is closed to new replies.