• Resolved jimmathis

    (@jimmathis)


    I updated my local dev site to GiveWP 2.7.3 from 2.7.2 and I get a fatal PHP error on trying to delete the plugin (I’m making sure my site gracefully handles no plugin); no plugins are active. Deleting 2.7.2 works fine. And nothing else changed about my site between testing 2.7.2 and 2.7.3.
    The admin dashboard has the message: Deletion failed: There has been a critical error on your website.Learn more about debugging in WordPress.
    And the Plugins screen entry for Give shows Deleting…
    The php error log is:
    PHP Fatal error: Uncaught Error: Call to undefined function give_is_setting_enabled() in /Applications/MAMP/htdocs/wp-content/plugins/give/uninstall.php:23
    Stack trace:
    #0 /Applications/MAMP/htdocs/wp-admin/includes/plugin.php(1222): include()
    #1 /Applications/MAMP/htdocs/wp-admin/includes/plugin.php(956): uninstall_plugin(‘give/give.php’)
    #2 /Applications/MAMP/htdocs/wp-admin/includes/ajax-actions.php(4545): delete_plugins(Array)
    #3 /Applications/MAMP/htdocs/wp-includes/class-wp-hook.php(287): wp_ajax_delete_plugin(”)
    #4 /Applications/MAMP/htdocs/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #5 /Applications/MAMP/htdocs/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #6 /Applications/MAMP/htdocs/wp-admin/admin-ajax.php(175): do_action(‘wp_ajax_delete-…’)
    #7 {main}
    thrown in /Applications/MAMP/htdocs/wp-content/plugins/give/uninstall.php on line 23

    When I deactivate the give plugin, function_exists(‘give_is_setting_enabled’) returns false; but it is found once more when I reactivate the give plugin (I use some code hooked into ‘admin_init’ to investigate). Same things happens in 2.7.2. After a bunch more investigating, I believe the autoloader in 2.7.3 isn’t working properly during the uninstall and thus why give_is_setting_enabled() isn’t found. In 2.7.2 files are manually included. For now I’ll just delete the plugin folder. Are there any PHP optional packages I need to get this working?

    My configuration is Mac (running MAMP), PHP 7.4.2, WP 5.4.2 with logging enabled, Twenty Twenty theme, single-site. Yes, Composer is great but I don’t use it.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Version 2.7.3 has fatal PHP error on delete’ is closed to new replies.