• Resolved taramahakita

    (@taramahakita)


    first of all thankyou for usefull dan well design login plugin

    i already test in localhost and it worked

    but when i test it on my site, it give me error 500

    i already debug it and found

    Cannot redeclare tgmpa() (previously declared in class-tgm-plugin.php:1927)

    for info, i have theme with class-tgm-plugin-activation.php

    and i’m not using / activate all of plugin that required by my theme

    can you help me please

    thankyou

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter taramahakita

    (@taramahakita)

    finally i can resolve (*temporary) my own problem

    i can enable plugin without getting error 500

    by disable 2 php file and edit 1 php file

    i rename :

    – class-tgm-plugin.php to class-tgm-plugin.php.old

    – tgm-dependencies.php to tgm-dependencies.php.old

    and delete :

    require CLASSES . ‘/tgm-dependencies.php’;

    in class.load-files.php

    but if anyone try to do this don’t forget to install shortcode ui in first place

    this plugin require installation of ” shortcode ui ” you can see that from class.load-files.php

    This is not an issue with the ProfilePress plugin, but with the theme you are using.

    The theme author has a typo (or rather, search and replace error) in their code.

    The TGMPA file in the theme will have a line looking like this:
    if ( ! function_exists( 'theme-slug' ) ) {

    That line should read:
    if ( ! function_exists( 'tgmpa' ) ) {

    As they incorrectly changed it, the function is being redefined causing that error.

    If you replace that one line in the TGMPA library included in the theme with the line above, the plugin and the theme will play nice together ??

    Alternatively, you can just drop in replace the TGMPA file which is included with the theme for the same result:

    1. Download the current version of the TGMPA 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 directory in which the theme currently has the file in your website, effectively replacing the existing class-tgm-plugin-activation.php file.

    Please ask the theme author to fix this and tell them the following:
    “If you download a fresh copy of TGMPA using the Custom TGMPA Generator, it will serve you with a customized download of TGMPA which will automagically have done the search & replace for you in the correct way.
    https://tgmpluginactivation.com/download/

    Hope this helps.

    Smile,
    Juliette

    Plugin Author Collins Agbonghama

    (@collizo4sky)

    Thank you @jrf

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘error 500 when activate plugin’ is closed to new replies.