• Resolved Brent Wilson

    (@bwbama)


    The plugin brought my site down after upgrade to 2.7.0 with this error

    [13-Jan-2022 20:56:04 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Incorrect index name 'membership_category' in /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php:2056
    Stack trace:
    #0 /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php(2056): mysqli_query()
    #1 /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php(1945): wpdb->_do_query()
    #2 /home/nginx/domains/bamapolitics.com/public/wp-admin/includes/upgrade.php(3032): wpdb->query()
    #3 /home/nginx/domains/bamapolitics.com/public/wp-content/plugins/paid-memberships-pro/includes/upgradecheck.php(389): dbDelta()
    #4 /home/nginx/domains/bamapolitics.com/public/wp-content/plugins/paid-memberships-pro/includes/upgradecheck.php(277): pmpro_db_delta()
    #5 /home/nginx/domains/bamapolitics.com/public/wp-content/plugins/paid-memberships-pro/paid-memberships-pro.php(126): pmpro_checkForUpgrades()
    #6 /home/nginx/domains/bamapolitics.com/public/wp-settings.php(409): include_once('...')
    #7 /home/nginx/domains/bamapolitics.com/wp-config.php(110): require_once('...')
    #8 /home/nginx/domains/bamapolitics.com/public/wp-load.php(55): require_once('...')
    #9 /home/nginx/domains/bamapolitics.com/public/wp-admin/admin.php(34): require_once('...')
    #10 /home/nginx/domains/bamapolitics.com/public/wp-admin/index.php(10): require_once('...')
    #11 {main}
      thrown in /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php on line 2056

    Downgraded to 2.6.7 for the time being.

    • This topic was modified 3 years, 2 months ago by Brent Wilson.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Kim Coleman

    (@kimannwall)

    Sorry for the issue you’ve run into. Thanks for the heads up on this. We see what the issue is and will be releasing a 2.7.1 update tonight that should fix the issue. Look out for that, and let us know how it went.

    Plugin Author Jason Coleman

    (@strangerstudios)

    Hi there. Sorry again for the issue. FYI here is a link to the patch which should fix this if you’d like to try it on your site before the update goes out.

    https://github.com/strangerstudios/paid-memberships-pro/commit/2bbc9683a0895bb9c6e4ae78117d7b14df8804d5

    This will be included in the 2.7.1 release. Thanks again.

    Plugin Author Jason Coleman

    (@strangerstudios)

    I just pushed out 2.7.1. Let me know if that works well for you. It worked in my tests. Hoping your MySQL setup likes this one.

    Plugin Author Jason Coleman

    (@strangerstudios)

    p.s. Are you going to WordCamp Birmingham? If so, look me up. I’ll be there.

    Thread Starter Brent Wilson

    (@bwbama)

    I am considering going and will do so.

    After upgrading to 2.7.1 and confirming that the upgrade was successful and the files are 2.7.1, I still have the same issue:

    [13-Jan-2022 22:47:48 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Incorrect index name 'membership_category' in /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php:2056
    Stack trace:
    #0 /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php(2056): mysqli_query()
    #1 /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php(1945): wpdb->_do_query()
    #2 /home/nginx/domains/bamapolitics.com/public/wp-admin/includes/upgrade.php(3032): wpdb->query()
    #3 /home/nginx/domains/bamapolitics.com/public/wp-content/plugins/paid-memberships-pro/includes/upgradecheck.php(389): dbDelta()
    #4 /home/nginx/domains/bamapolitics.com/public/wp-content/plugins/paid-memberships-pro/includes/upgradecheck.php(277): pmpro_db_delta()
    #5 /home/nginx/domains/bamapolitics.com/public/wp-content/plugins/paid-memberships-pro/paid-memberships-pro.php(126): pmpro_checkForUpgrades()
    #6 /home/nginx/domains/bamapolitics.com/public/wp-settings.php(409): include_once('...')
    #7 /home/nginx/domains/bamapolitics.com/wp-config.php(110): require_once('...')
    #8 /home/nginx/domains/bamapolitics.com/public/wp-load.php(55): require_once('...')
    #9 /home/nginx/domains/bamapolitics.com/public/wp-admin/admin.php(34): require_once('...')
    #10 /home/nginx/domains/bamapolitics.com/public/wp-admin/index.php(10): require_once('...')
    #11 {main}
      thrown in /home/nginx/domains/bamapolitics.com/public/wp-includes/wp-db.php on line 2056

    I have downgraded successfully back to 2.6.7.

    • This reply was modified 3 years, 2 months ago by Brent Wilson.
    Thread Starter Brent Wilson

    (@bwbama)

    I am running:

    [22:52][root@xxxxx plugins]# mysql –version
    mysql Ver 15.1 Distrib 10.4.22-MariaDB, for Linux (x86_64) using readline 5.1

    • This reply was modified 3 years, 2 months ago by Brent Wilson.
    Plugin Author Jason Coleman

    (@strangerstudios)

    Oh, man. A work around would be to update the pmpro_db_version option in your wp_options table and set it to 2.71. This will skip the dbDelta run. You can then upgrade to 2.7.1 and it shouldn’t try to update the DB. The change was actually to catch a similar edge case to what you are running into and not critical to the plugin.

    I think we’re maybe trading edge cases here and hope I can find a solution that works for everyone.

    Thanks for sharing your DB information. I’m going to do more testing.

    Thread Starter Brent Wilson

    (@bwbama)

    Thanks, changing it to 2.71 allowed the update to run and now running 2.7.1.

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