• Resolved jberg1

    (@jberg1)


    Getting a new error after recent update.

    PHP Fatal error: Cannot redeclare tgmpa() (previously declared in /wp-content/plugins/wp-spell-check/lib/class-tgm-plugin-activation.php:2126)

    This is being declared in my theme also. I would guess other themes have this since it is for TGM Plugin Activation library? Unsure if there is a better way, or if the theme should be calling it differently.

    Also this

    WordPress database error Column 'keyword' cannot be null for query INSERT INTO 'wp_dzci_spellcheck_ignore' ('keyword', 'type') VALUES (NULL, 'page') made by wpscx_error_reporting

    Which probably isn’t a fatal error.
    Just to let you know.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @jberg1 This is unrelated to WP Spell check, but an issue with your 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 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 in the part you didn’t show in your bug repor – i.e. the “the function was previously declared in …” 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.

    Thread Starter jberg1

    (@jberg1)

    Thanks Juliette!
    Super helpful.

    Figures it is the theme. @#$@!

    Thanks again.

    Plugin Author WP Spell Check

    (@wpspellcheck)

    @jrf thank you for replying to this post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal Error with tgmpa()’ is closed to new replies.