Support » Plugin: Popup by Supsystic » Fatal Error: Cannot redeclare tgmpa()

  • Resolved kjy112

    (@kjy112)


    Fatal error: Cannot redeclare tgmpa() (previously declared in /public_html/wp-content/plugins/popup-by-supsystic/modules/tgm_promo/classes/class-tgm-plugin-activation.php:2126) in /public_html/wp-content/themes/xx/includes/plugins/class-tgm-plugin-activation.php on line 2118

    I am getting a fatal error for admin dashboard. The frontend is fine…its just the backend after updating to 1.9.10. Is there a way around not declaring tgmpa twice and still make this popup plugin work?

Viewing 7 replies - 1 through 7 (of 7 total)
  • jyeatman

    (@jyeatman)

    I’m getting the same error but cannot log in because of it

    kjy112

    (@kjy112)

    It’s a clash of tgmpa() function declared by this plugin and also by my theme. Both using class-tgm-plugin-activation.php for “recommend activation of plugins” notifications in the admin panel.

    Is there a way around this?

    jrf

    (@jrf)

    This is typically caused by a theme author having done an incorrect search & replace in the TGMPA file.

    The simplest way to get round this, is to replace the file.

    1. Download the current version of the library from http://tgmpluginactivation.com/download/ (for your purposes, just click on the “Zipball” link below the form)
    2. Unzip the file and
    3. Copy/upload (via FTP) just the class-tgm-plugin-activation.php file to the /public_html/wp-content/themes/xx/includes/plugins/class-tgm-plugin-activation.php directory of your website, replacing the existing class-tgm-plugin-activation.php file.

    Once you’ve done that, all should be fine again.

    All the same, please contact the Theme author and ask them to update the TGMPA file they include with their theme. They should download a fresh copy of TGMPA using the Custom TGMPA Generator, which will serve them with a customized download of TGMPA which will automagically have done the search & replace the correct way.

    Hope this helps.

    Plugin Author supsystic

    (@supsysticcom)

    Hi, @kjy112

    This is a conflict with template.
    We will release a fix for it.
    I’ll inform you about update.

    Best regards.

    jrf

    (@jrf)

    @supsystic This is not something you should “fix”, you will only be making things worse. This is an issue with the theme the user is using, not your plugin.

    kjy112

    (@kjy112)

    @jrf

    Thank you for this. Works like a charm. I’ve contacted the theme author. Thank you for the prompt response @supsysticcom

    • This reply was modified 4 months ago by  kjy112.
    Plugin Author supsystic

    (@supsysticcom)

    OK.
    I’m glad that you solved the issue.
    If you have any other questions, just let us know.

    Best regards.

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