• Resolved Hook and Loop

    (@twodozen)


    I’m trying to add this to a new build. When I activate it, it creates a 500 error. This seems to be tied to the theme somehow. It works OK on default WP themes, but the error comes up on a premium theme (Kubb).

    Any idea what I need to target to get these 2 to work together?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Hook and Loop

    (@twodozen)

    There are 2 messages in the error log that might help illustrate…

    PHP Warning: Invalid argument supplied for foreach() in /home/moodiest/public_html/wp-content/plugins/sunshine-photo-cart/classes/countries.class.php on line 421

    PHP Fatal error: Cannot redeclare tgmpa() (previously declared in /home/moodiest/public_html/wp-content/plugins/sunshine-photo-cart/addons/addon-manager/class-tgm-plugin-activation.php:2126) in /home/moodiest/public_html/wp-content/themes/kubb/admin/class-tgm-plugin-activation.php on line 1041

    Hi twodozen,

    The Kubb theme is using an out-of-date version of an external library (TGMPA) and they really should upgrade to the latest version.

    In the mean time, you can fix this yourself by applying the upgrade to your installation.

    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 /home/moodiest/public_html/wp-content/themes/kubb/admin/ 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, I’d highly recommend that you ask the theme author to release a new version of the theme which includes this upgrade.

    Hope this helps.

    Smile,
    Juliette

    Thread Starter Hook and Loop

    (@twodozen)

    Thanks Juliette. Such a helpful answer! I was thinking that might be the issue, comparing the 2 code segments.

    Maybe I should add this to a child theme initially, just in case the author overwrites with an old version again in an update?

    Thread Starter Hook and Loop

    (@twodozen)

    In case anyone else is having this issue – the child theme solution didn’t fix it so I had to overwrite the original. That did the trick.

    Thanks @jrf, perfect answer!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Activation error’ is closed to new replies.