• Resolved mayday295

    (@mayday295)


    Getting a fatal error when activating this plugin alongside wps-hide-login. It only started occurring recently, but have been using both plugins simultaneously for a while. Error disappears after deactivating glossary plugin.

    Fatal error: Cannot redeclare dnh_is_dismissed() (previously declared in /home/customer/www/plantingyourfuture.com/public_html/wp-content/plugins/wps-hide-login/vendor/NicolasKulka/wp-dismissible-notices-handler/includes/helper-functions.php:75) in /home/customer/www/plantingyourfuture.com/public_html/wp-content/plugins/glossary-by-codeat-premium/vendor/julien731/wp-dismissible-notices-handler/includes/helper-functions.php on line 98

    Using Glossary Pro, latest edition. Latest PHP and Wordpess.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    this is an issue of the wps-hide-plugin already reported: https://wordpress.org/support/topic/fatal-error-on-a-fresh-install-2-0-8/

    I patched and also updated the library to avoid conflicts but seems that is not enough. The problem is that plugin that use a fork of the original library that is not updated, instead we are using the last version.

    It is time that I ping the devs of that plugin personally to fix it.

    @mte90 , to conclude, I checked the code in helper-functions.php of two other plugins, and my assumption is that they are all still at fault. It isnt about libraries being uptodate.

    The DNH function should be either in a class or have a unique function name, like “glossary_DNH”. The check for double occurrence of functions happens by php itself before processing logic, so an if then statement at the start of the include file checking for the loaded state of the function does not sufficiently solve this.

    Please consider renaming the DNH function to a unique variant.

    Hi tezalsec,
    both of the plugins use a library with composer, so we cannot change it or it will be a new fork.
    The issue is that the one of Glossary is the version updated from few months ago and has a code to avoid the error.
    So this is what happening:

    Now Glossary is executed before that plugin and the code of the library that check if function exists doesn’t find anything.
    Later the wps-hide-plugin is executed with the library from 2018 and from a fork that doesn’t have this check so load the function also if it is already defined.
    If that plugin not use the fork and the original one, the function will not added again because there is a check.

    @mte90 , thanks for explaining. you might want to read the latest comments in below link. i am pulling back on this issue now 🙂

    https://wordpress.org/support/topic/fatal-error-cannot-redeclare-dnh-function/#post-14058809

    The latest version has a library update that should be avoid those errors.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error plugin conflict’ is closed to new replies.