• Resolved Bryan Cady

    (@bobcatou)


    For the last couple of months, I have been working away at this problem off and on and from my research, I’m out of ideas.

    On a recent update to WP-Give, you asked to update/upgrade the database. After I click the button to do this, I receive the error, “An unexpected issue occurred during the database update which caused it to stop automatically. Please contact support for assistance.”

    I’ve tried several solutions I found on the web.

    First I made a copy of the site on my local machine, (using MAMP) to make it easier to reset the site.

    I’ve deactivated and deleted, Wordfence, Super Cache,
    disabled Memcache, and even changed the site to a new theme. All of these tries gives me the same error.

    I’m running the latest core of WP and PHP 7.4 with Maria DB 10.2 on my live site and Mysql on my MAMP site.

    Do you have any other recommendations, I can try.

    Thanks in advance
    Bryan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Matheus Martins

    (@matheusfd)

    Hi @bobcatou,

    Happy to help you!

    In the latest releases of GiveWP, we added a new database table but some hosts prevented it from being created. Here is what you need to do:

    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. If you get a message like “No upgrade for the given ID” it should mean that you already see some updates ready to run. Proceed to the next step)
    2. Run the update at Donations > Updates or by clicking the message at the top of the admin screens.
    3. Go to this URL:
    /wp-admin/edit.php?post_type=give_forms&page=give-tools&tab=logs&section=updates (this checks the logs to see if there were any errors. If you see errors, pass them along in a reply here.

    Please let us know if you have further questions on this or need any additional assistance!

    I’m having the same issue.
    My site is now very slow but works fine if I deactivate Give Plugin.

    Here is the error I get after completing the steps outlined above:

    Update Task
    Array
    (
    [update_info] => Array
    (
    [id] => add-past-donation-data-to-revenue-table
    [version] => 2.9.0
    [callback] => Array
    (
    [0] => Give\Revenue\Migrations\AddPastDonationsToRevenueTable Object
    (
    )

    [1] => run
    )

    [type] => database
    )

    [step] => 1
    [update] => 1
    [heading] => Update 1 of 1
    [percentage] => 0
    [total_percentage] => 0
    )

    Error
    An error occurred when processing Donation #1833. To insert revenue, please provide valid donation_id, form_id, amount.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hey @alexandremichel1,

    As per your logs, this is the error:
    An error occurred when processing Donation #1833. To insert revenue, please provide valid donation_id, form_id, amount.

    It means that donation #1833 has a problem and needs to be deleted/fixed (if possible only).

    After you delete/fix this donation, try to restart the upgrade. If it freezes again, you should navigate to your logs, check if there is a corrupted donation, delete it and restart the upgrade.

    Have a great day ??

    Thanks for the reply.
    I followed your advice.
    Update to DB keeps failing, with a new donationID displayed in the log.
    I tried deleting three problematic donations. Since the IDs were all sequential, I’m guessing they are all problematic?

    Thread Starter Bryan Cady

    (@bobcatou)

    Hi Matheus,

    What you describe to me didn’t work, but I learned from @alexandremichel1 what was going on with my database after looking at the logs.

    Several of my donation entries had no form attached and marked “#untitled” After I gave each entry the correct donation form, the problem was resolved.

    Alexandremichel1 I recommend you look there

    Thanks for the help. It’s appreciated

    Bryan

    Bryan!
    Thanks for the tip.
    This was indeed the case.
    Update ran fine after assigning missing form IDs.
    Site is still running slow though (much faster if I deactivate GiveWP!)

    Thanks again!
    Alex

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Database upgrade fail…out of ideas’ is closed to new replies.