• Resolved vela984

    (@vela984)


    Hi,

    I cannot update the Give plugin due to some issues with the database. I have followed all of the outlined steps in the article, cleared database caching, disabled security plugins and reviewed the Ajax issues as well. I don’t know what else to do and would appreciate the help.

    The page I need help with: [log in to see the link]

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

    (@matheusfd)

    Hi, @vela984.

    ​Glad you reached out. I can help you.

    Every time a database upgrade fails, GiveWP creates a new entry on the logs section on the dashboard that gives us further information on what is happening. Can you send me logs for when you try to upgrade the database and get the errors? You can find the logs under Donations > Tools > Logs.

    ​Also, please send along your System Info.

    Navigate to Donations –> Tools –> System Info (tab) and click the button to “Get System Report” and copy/paste that in your reply here.

    That will give me some more context to be able to help.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hey there.

    It’s been a while since we’ve heard back, and I know troubleshooting needs a little extra time. I’m marking this as resolved for now, but if you still have questions, you can send them along right here, and I’ll be happy to hop back in.

    Have a great day!

    Thread Starter vela984

    (@vela984)

    I apologize. I was not available to respond. Here is what the last two logs say:

    Log report 1

    { “post_title”: “Update Pause”, “post_content”: “stdClass Object\n(\n [key] => wp_give_db_updater_batch_d7918740c89444d87a231cd5de7ddff2\n [data] => Array\n (\n [27] => Array\n (\n [id] => v240_update_form_goal_progress\n [version] => 2.4.0\n [callback] => give_v240_update_form_goal_progress_callback\n [type] => database\n )\n\n [28] => Array\n (\n [id] => add-past-donation-data-to-revenue-table\n [version] => 2.9.0\n [callback] => Array\n (\n [0] => Give\\Revenue\\Migrations\\AddPastDonationsToRevenueTable Object\n (\n )\n\n [1] => run\n )\n\n [type] => database\n )\n\n [29] => Array\n (\n [id] => migrate_existing_logs\n [version] => 2.10.0\n [callback] => Array\n (\n [0] => Give\\Log\\Migrations\\MigrateExistingLogs Object\n (\n [logTypeHelper:Give\\Log\\Migrations\\MigrateExistingLogs:private] => Give\\Log\\Helpers\\LogTypeHelper Object\n (\n )\n\n [legacyLogsTable:Give\\Log\\Migrations\\MigrateExistingLogs:private] => Give\\Log\\Helpers\\LegacyLogsTable Object\n (\n )\n\n )\n\n [1] => run\n )\n\n [type] => database\n )\n\n )\n\n)\n”, “post_parent”: 0, “log_type”: “update”, “file”: “/home/hearnfmo/public_html/wp-content/plugins/give/includes/admin/upgrades/class-give-updates.php”, “line”: 360, “function”: “add”, “class”: “Give_Logging” }

    Log report 2

    { “Data”: { “donation_id”: 284, “form_id”: 0, “amount”: 0 }, “Error”: “An error occurred when processing Donation #284. To insert revenue, please provide valid donation_id, form_id, amount.” }

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @vela984.

    The issue here is related to Donations (likely very old ones) that have somehow become detached from their donation form in the database. From your error message, I see that it’s currently hung up on donation #284:

    “Error”: “An error occurred when processing Donation #284. To insert revenue, please provide valid donation_id, form_id, amount.”

    The slightly boring technical explanation of what’s going on there: the update routine in question has to do with moving old donations that were made before GiveWP had a concept of “revenue” into the new revenue database table. In order to add donations to the revenue table, it needs a donation ID, Form ID, and amount. If any single donation on the site does not have one of those three things, the updater stops and logs the error.

    The fastest way around it is what you mentioned, deleting the offending donations. Unfortunately, it stops on the first one it finds and doesn’t tell you about any others of them, so you have to comb through all the donations and find ones that are detached from their form.

    Let us know about that first error, and we’re happy to dig in!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Cannot update because of database issues’ is closed to new replies.