Support » Plugin: GiveWP - Donation Plugin and Fundraising Platform » Cannot delete donations

  • Resolved Matt Scheidler


    We are getting the following error when attempting to delete donations. Unfortunately bogus donations do appear from time to time and we’re trying to keep the listing clean.

    I found that someone else reported this same issue earlier today, but they tagged onto an existing thread. So I wanted to also report it, in a new thread.

    Here is the error we are receiving:


    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, Give – Donation Plugin.

    First, visit your website ( and check for any visible issues. Next, visit the page where the error was caught ( and check for any visible issues.

    Please contact your host for assistance with investigating this issue further.

    If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further.

    To keep your site safe, this link will expire in 1 day. Don’t worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.5.3
    Current theme: OCCF Child Theme (version 0.1.0) Current plugin: Give – Donation Plugin (version 2.9.5) PHP version

    Error Details
    An error of type E_ERROR was caused in line 32 of the file /home/s10/html/wp-content/plugins/give/src/Framework/Database/Exceptions/DatabaseQueryException.php. Error message: Uncaught Give\Framework\Database\Exceptions\DatabaseQueryException: Query failed in database in /home/s10/html/wp-content/plugins/give/src/Framework/Database/Exceptions/DatabaseQueryException.php:32
    Stack trace:
    #0 /home/s10/html/wp-content/plugins/give/src/Framework/Database/DB.php(79): Give\Framework\Database\Exceptions\DatabaseQueryException::create(Array)
    #1 /home/s10/html/wp-content/plugins/give/src/Framework/Database/DB.php(49): Give\Framework\Database\DB::runQueryWithErrorChecking(Object(Closure))
    #2 /home/s10/html/wp-content/plugins/give/src/Revenue/Repositories/Revenue.php(62): Give\Framework\Database\DB::delete(‘wp_give_revenue’, Array, Array)
    #3 /home/s10/html/wp-content/plugins/give/src/Revenue/Listeners/DeleteRevenueWhenDonationDeleted.php(39): Give\Revenue\Repositories\Revenue->deleteByDonationId(‘2765’)
    #4 [internal function]: Give\Revenue\Listeners\DeleteRevenueWhenDonationDeleted->__invoke(‘2765’)
    #5 /home/s10/html/wp-content/plugins/give/src/Helpers/Hooks.php(37): call_user_func_array(Array,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ben Meredith


    Hey @matt6303

    Thanks for starting a new thread, and for the great context here. You’ve isolated a problem when the Revenue table is not created.

    There’s a fix for it:

    1. Go to the following URLs, in order: (add your base URL to each)
    /wp-admin/?give-run-migration=create_revenue_table (this manually forces the database routine again)
    /wp-admin/?give-clear-update=add-past-donation-data-to-revenue-table (this clears the update so that your site can try again. You should see an update alert after this one runs)
    2. Run the update!
    3. Try to delete a donation again.

    ​​Let me know if that resolves things, or if you need further assistance. ​Thanks for using GiveWP! Have a great day.

    Ben, thank you for the prompt reply. Unfortunately those steps did not work.

    I went to the first URL, and then the second. Upon entering the second URL I got the error:

    An unexpected issue occurred during the database update which caused it to stop automatically. Please contact support for assistance.

    That was in the morning. I came back to the site again a few hours later and tried the steps a second time, and this time I got a new error upon entering the second URL:

    Unable to reset migration. Error: No upgrade for the given ID: add-past-donation-data-to-revenue-table

    Any further guidance is appreciated. If I can provide additional information please let me know. I appreciate your help.

    I just noticed the ticket was marked as resolved. That was probably from your initial reply and I didn’t catch it. Marking this as unresolved and making this brief comment. Thank you for your help.

    Plugin Contributor Ben Meredith


    Hi @matt6303

    When you attempt to run the update, go and check the error logs at Donations > Tools > Logs > Updates. Looke for the one Marked “error” and click the eye icon to see more detail.

    The update routine that is not completing is the one that adds all existing donations to the newly-created “revenue” table. The error message there will indicate which donation is causing the updater to stop.

    Usually, this is caused by a donation that has been disassociated with the form. Make sure all donations on the site are associated with a form, and you should be good to go. If not, definitely loop us back in.

    Plugin Support Matheus Martins


    Hey @matt6303,

    Are you still facing this issue? Do you need assistance?

    Your success with online donations is our number one priority. Looking forward to helping you get to the bottom of this!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.