Support » Plugin: Constant Contact Forms » PHP fatal error after update to 1.5.0 – wp-login white page

  • Resolved Michael L.

    (@michael-luther)


    PHP Fatal error occurred:
    Cannot redeclare tgmpa() (previously declared in /…/wp-content/plugins/constant-contact-forms/vendor/webdevstudios/wds-shortcodes/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php:1927) in /…/wp-content/themes/decibel/wp-wolf-framework/classes/class-tgm-plugin-activation.php on line 2126.

    I’ll try to reset to version 1.45 then. Hopefully it works.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Constant Contact

    (@constantcontact)

    Good day Michael,

    It looks like our plugin and your current theme both use the same TGM_Plugin_Activation library and possibly the theme copy is not checking if the a tgmpa() function already exists before trying to define it.

    Are you willing and able to provide the contents of the wp-content/themes/decibel/wp-wolf-framework/classes/class-tgm-plugin-activation.php file so that we can confirm if that’s the case. If you prefer, we can provide an email address to send a text file to, with the file contents.

    Let us know.

    Michael L.

    (@michael-luther)

    Thank you very much for your quick reaction.

    Of course I can send you the file. But I don’t want to post the link here, so please send me an e-mail.

    (By the way, version 1.45 is now reinstalled and access to the backend is working again.)

    Plugin Author Constant Contact

    (@constantcontact)

    Please email apisupport@constantcontact.com and cc support@pluginize.com for sharing that.

    Thanks

    Any updates??

    Michael L.

    (@michael-luther)

    I just sent the file by email.

    Plugin Author Constant Contact

    (@constantcontact)

    Received and reviewing.

    Plugin Author Constant Contact

    (@constantcontact)

    Responded to the thread privately, I’ve been told

    Michael L.

    (@michael-luther)

    Ok, thank you for reviewing the code of my provided theme file.

    It is a theme specific problem. The concerned theme is called “Decibel – Professional Music WordPress Theme” by Wolf Themes.

    The developers of the theme have changed the function name from “tgmpa” to “decibel”. This renaming causes the conflict. The solution lies at the theme developers, who should simply not rename this function.

    The TGMPA code in general is meant to facilitate recommending or requiring certain plugins and making it easy to get them installed for users.

    Hi, I also received the same error and have temporarily disabled the plugin. The theme uses the class-tgm-plugin-activation.php file shown on Github here: https://github.com/CherryFramework/CherryFramework/blob/master/includes/class-tgm-plugin-activation.php

    Plugin Author Constant Contact

    (@constantcontact)

    @jblackburn what’s the exact error you’re seeing?

    Asking because these lines highlighted at the link below are showing what we would expect to see to help prevent these types of issues. This has me wondering if a different error is cropping up or perhaps from a different 3rd location for this library.

    https://github.com/CherryFramework/CherryFramework/blob/master/includes/class-tgm-plugin-activation.php#L1055-L1065

    Sure, here you go, folders renamed:

    Fatal error: Cannot redeclare tgmpa_load_bulk_installer() (previously declared in /folder/folder/folder/folder/wp-content/plugins/constant-contact-forms/vendor/webdevstudios/wds-shortcodes/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php:2931) in /folder/folder/folder/folder/wp-content/themes/CherryFramework/includes/class-tgm-plugin-activation.php on line 2218

    Moderator Bet Hannon

    (@bethannon1)

    Support Team Volunteer Coordinator

    Just to chime in: I think I’m also seeing this error:

    PHP Fatal error occurred: Cannot redeclare tgmpa() (previously declared in /folder/folder/public_html/wp-content/plugins/constant-contact-forms/vendor/webdevstudios/wds-shortcodes/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php:1927) in /folder/folder/public_html/wp-content/themes/ubbc-theme/lib/class-plugin-activation.php on line 2123.

    We’ve rolled back to 1.4.5, and the issue does not occur with that version.

    Plugin Author Constant Contact

    (@constantcontact)

    @jblackburn

    Looking over that CherryFramework file, with this error in mind, I’m seeing the following code:

    https://github.com/CherryFramework/CherryFramework/blob/master/includes/class-tgm-plugin-activation.php#L1695-L1706

    This is in contrast to what we have in our plugin copy:

    add_action( 'admin_init', 'tgmpa_load_bulk_installer' );
    if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
    	/**
    	 * Load bulk installer
    	 */
    	function tgmpa_load_bulk_installer() {
    

    Due to the load order of plugins vs themes, our version is loaded first, and it has checks for the function existing first, just as extra assurance. However, the CherryFramework item does not do any checking first, which is why the error is occurring here.

    It also looks like they’ve had a pull request for this exact same issue for over 2 years, but it has yet to be merged in https://github.com/CherryFramework/CherryFramework/pull/50

    Plugin Author Constant Contact

    (@constantcontact)

    @bethannon1 can you provide a copy of the class-plugin-activation.php file so we can confirm some details around this?

    Moderator Bet Hannon

    (@bethannon1)

    Support Team Volunteer Coordinator

    Sure. Emailing to apisupport@constantcontact.com as given earlier in this topic.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘PHP fatal error after update to 1.5.0 – wp-login white page’ is closed to new replies.