• Resolved Jeremy Saxey

    (@jr00ck)


    With version 1.4.14.1 of the plugin and Organic Purpose theme version 2.6.2 we cannot activate either plugin or theme if either one is active first. The site is completely broken at that point and has to disable the plugin via SFTP to get it back up.

    The PHP error is:

    PHP Fatal error: Cannot redeclare tgmpa() (previously declared in .../wp-content/plugins/organic-customizer-widgets/includes/class-tgm-plugin-activation.php:2126) in .../wp-content/themes/organic-purpose/includes/plugin-activation-class.php on line 2126

    • This topic was modified 3 years, 4 months ago by Jeremy Saxey.
    • This topic was modified 3 years, 4 months ago by Jeremy Saxey.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello, I have the same issue and I dont know what to do .Have you found the solution ?

    Thread Starter Jeremy Saxey

    (@jr00ck)

    The solution is for the Organic Themes team to rename the function tgmpa() in either the plugin or theme, since they reused that name in each, which is a PHP no-no. You can try renaming it yourself until a fix comes in but unless you know code you could just further break things, so I don’t recommend it. Hopefully they’ll issue an update soon.

    @jr00ck Actually no, though the problem is in the Organic Purpose theme

    The problem is that the theme author clearly has done a manual search & replace in the TGMPA code – probably for the text domain – and done this incorrectly.

    The simplest way to get round this, is to replace the TGMPA file in your theme.

    1. Download the current version of the library from https://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 location indicated by the error message, i.e. the wp-content/themes/organic-purpose/includes/ directory, 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.
    https://tgmpluginactivation.com/download/

    Hope this helps.

    Plugin Author Organic Themes

    (@organicthemes)

    Hi All,

    We apologize for this inconvenience.

    As Juliette and Jeremy mentioned, this error was occurring if your theme already declared support for the TGM plugin activation script. We recently pushed a plugin update to resolve this issue.

    Updating to version 1.4.15 of the Builder Widgets plugin should fix the error.

    I hope this helps.

    Thanks!

    Thread Starter Jeremy Saxey

    (@jr00ck)

    Thanks for the fix! It’s working for us w/ version 1.4.15 of the plugin. Marking this issue resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conflict between plugin and Organic Purpose theme’ is closed to new replies.