Support » Plugin: GiveWP - Donation Plugin and Fundraising Platform » Database Won’t Update

  • Resolved icehound

    (@icehound)


    I have followed all of the documentation to make the database upgrades work. They are frozen and won’t move. I asked my host to look into it; they said they also followed all of the documentation. They sent me an error log and said to share it with GiveWP support to see if there is some changes they could make server-side to help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter icehound

    (@icehound)

    This is what my host says, “I disabled your custom Dashboard admin path and modified your .htaccess due to some potential issues with this process but that didn’t seem to help so I migrated your account to another server, waited for some more time but it’s the same situation as before.

    I don’t see your account hitting any limits right now and even on a basic WordPress installation this is not working.

    Did they say how long it’s supposed to take and do they have an option to just install the newer/updated version instead of having to upgrade from your Dashboard?”

    Plugin Contributor Ben Meredith

    (@benmeredithgmailcom)

    Hey @icehound!

    I am glad you reached out here, we can definitely help.

    Whenever the database updates fail, a general error is displayed, and a more specific error is logged in the database. Here’s how you can view those logs:

    1. Attempt the update again.
    2. Navigate to Donations > Tools > Logs
    3. Click the eye icon beside the error that mentions what failed.
    4. Read that (sometimes there will be enough information for you to solve the problem yourself, and sometimes you’ll need to loop us back in)

    Is this a fresh GiveWP installation, or are the existing donations already in the database?

    The most common reason that database updates stall is that the donation records become corrupt and/or detached from their form. Not to get too much in the weeds (in case this isn’t your actual problem) but if a donation record is somehow detached from a form, one of the database updates that needs to happen can’t, and even just one record like that will break things. Usually the error message for that will point you to one specific donation, by donation ID, and then you can go to that donation and either delete it, or manually add the form back to it.

    The only other “common” (it’s actually very uncommon in the grand scheme of things) way that database updates fail is that the database itself is missing tables, or columns. That should also be fairly obvious from viewing the logs.

    Either way, we’re happy to help you get to the bottom of things.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hey @icehound,

    Do you still need assistance here? I’ll close this ticket for now but if you still need assistance with it, please reopen it and we’ll happily assist you.

    If you have other issues, you can open a new ticket and we’ll help you there too.

    Thanks for using GiveWP! Have a great day.

    Thread Starter icehound

    (@icehound)

    Hey, so your suggestions didn’t work. It is a clean install. There are no donations in the database. I even tried uninstalling and reinstalling the plugin and started from scratch. It still fails to upgrade the database.

    Plugin Support Rick Alday

    (@mrdaro)

    Hi @icehound,

    Are there any entries in Donations > Tools > Logs related to the database update?

    Thread Starter icehound

    (@icehound)

    There are 11 pages of errors including “Update Health Check” “Update Restart”
    “Update Pause” and “Update Error”

    Thread Starter icehound

    (@icehound)

    Is there any solution? My hosting support has tried everything.

    Plugin Support Rick Alday

    (@mrdaro)

    Hi @icehound,

    Click the eye icon next to any log entry that has “Update Error” and copy/paste the entire error message in your next reply.

    This will hopefully tell us what’s going on.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @icehound.

    Do you still need assistance here? I’ll close this ticket for now but if you still need assistance with it, please reopen it and we’ll happily assist you.

    If you have other issues, you can open a new ticket and we’ll help you there too.

    Thanks for using GiveWP! Have a great day.

    Thread Starter icehound

    (@icehound)

    Sorry, I was on holidays. Here is the log report:

    Description:
    Update Error
    Category:
    Migration
    Source:
    Give Core
    Date & Time:
    2021-12-17 03:52:03
    post_title:Update Error
    post_content:Update Task
    Total update count: 0
    Update IDs: Array
    (
    )
    Update: Array
    (
        [update_info] => Array
            (
                [id] => migrate_existing_logs
                [version] => 2.10.0
                [callback] => Array
                    (
                        [0] => Give\Log\Migrations\MigrateExistingLogs Object
                            (
                                [logTypeHelper:Give\Log\Migrations\MigrateExistingLogs:private] => Give\Log\Helpers\LogTypeHelper Object
                                    (
                                    )
    
                                [legacyLogsTable:Give\Log\Migrations\MigrateExistingLogs:private] => Give\Log\Helpers\LegacyLogsTable Object
                                    (
                                    )
    
                            )
    
                        [1] => run
                    )
    
                [type] => database
            )
    
        [step] => 40150354
        [update] => 1
        [heading] => Update 1 of 2
        [percentage] => 0
        [total_percentage] => 0
    )
    post_parent:0
    log_type:update
    file:/home/unitycar/public_html/wp-content/plugins/give/includes/class-give-background-updater.php
    line:365
    function:add
    class:Give_Logging
    Plugin Support Rick Alday

    (@mrdaro)

    This is an issue of the logs not migrating correctly.

    Here’s a long-winded explanation:

    We overhauled the logging system in GiveWP in version 2.10.x to make it much more easy to manage logs in the application. A part of that overhaul was taking the existing logs (in a table named wp_give_logs) and moving them to a new table that was structured in a way that is more performant. The new table is named wp_give_log (no s on the end). The order of events was the following:

    1. create the new log table. (this happens silently upon update to 2.10.x)
    2. migrate the logs from the old logs table to the new log table (this happens as a result of clicking the button to run the updates)
    3. delete the old an no longer needed logs table. (this happens at the end of step 2, automatically)

    Somehow on their site the logs table was deleted before the migration in step 2 happened, and GiveWP doesn’t know how to fix that, so it just kinda fails with a logged failure.

    Manually adding back in the logs table and then running the migration fixes the problem.

    I’ve linked to a SQL file here with that dummy log in it, for you to attempt the same on your side: https://drive.google.com/file/d/16GSitC3f1XacGTxk_YM1WOfU0U4WIZ-N/view?usp=sharing Your host should be able to help with manually adding in that missing table from this SQL file:

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

    Plugin Support Rick Alday

    (@mrdaro)

    Hi @icehound,

    Just following up. Do you still need assistance here?

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