• Resolved Gerry

    (@metamezzo)


    Hello,

    GiveWP plugin currently at 2.10.1 so when I ran the DB update and saw that it got stuck at ‘Update 1 of 1’ I paused the upgrade and followed the steps under ‘The Solution(s)’ at https://givewp.com/documentation/core/frequent-troubleshooting-issues/handling-database-update-issues/ — following the Run Order from 1 to 6 all Migration Title entries showed ‘Success’ under the Status column and the Last run entries were all updated. I then went back to restarting the DB upgrade after disabling Advanced Database Updates, but still the update was stuck at ‘Update 1 of 1’. In the logs here is the Error entry for Migration with the Description: Update Health Check … the version says ‘2.10.0’ which I thought was strange but I’m not really sure.

    post_title:Update Health Check
    post_content: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
    )
    
    Updated doing 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] => 1
        [update] => 1
        [heading] => Update 1 of 1
        [percentage] => 0
        [total_percentage] => 0
    )
    
    post_parent:0
    log_type:update
    file:/home/customer/www/x_redacted_x/public_html/wp-content/plugins/give/includes/admin/upgrades/class-give-updates.php
    line:574
    function:add
    class:Give_Logging
    
    If you like GiveWP please leave us a ★★★★★ rating. It takes a minute and helps a lot. Thanks in advance!
    
    Version 5.7.1
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Ben Meredith

    (@benmeredithgmailcom)

    Hi @metamezzo

    We’ve seen this happen with another user just today, and for them it came down to a missing database table.

    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.

    Thread Starter Gerry

    (@metamezzo)

    Hi @benmeredithgmailcom

    Thanks for your reply. I checked the site database and found that we still have both wp_give_log and wp_give_logs tables. I used the SQL file provided to see if resetting the wp_give_logs table would help, but unfortunately updates are still stuck (Update 1 of 1) after restarting the upgrade. Here’s the latest error log … I think it looks exactly like the one I posted earlier.

    post_title:Update Health Check
    post_content: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
    )
    
    Updated doing 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] => 1
        [update] => 1
        [heading] => Update 1 of 1
        [percentage] => 0
        [total_percentage] => 0
    )
    
    post_parent:0
    log_type:update
    file:/home/customer/www/xx_redacted_xx/public_html/wp-content/plugins/give/includes/admin/upgrades/class-give-updates.php
    line:574
    function:add
    class:Give_Logging
    
    If you like GiveWP please leave us a ★★★★★ rating. It takes a minute and helps a lot. Thanks in advance!
    
    Version 5.7.1
    Plugin Support Rick Alday

    (@mrdaro)

    Hi @metamezzo,

    Can you double-check if the wp_give_logs has at least one entry in it?
    If it doesn’t, that’s most likely the cause of the problem. The sample SQL has a dummy entry that you can use.

    Thread Starter Gerry

    (@metamezzo)

    Hi @mrdaro

    Yes, there had been 322 entries in the wp_give_logs table when I replaced them with the single entry from the SQL file from Ben.

    I still have the dump file of the previous 322 entries.

    The error logs show “2.10.0” for [version] but the current plugin version is 2.10.1 and needs to be updated. Is that difference in the versions correct?

    • This reply was modified 3 years, 6 months ago by Gerry.
    Plugin Support Rick Alday

    (@mrdaro)

    Hi @metamezzo,

    Try updating to GiveWP 2.10.4 and then try to complete the database update.

    Plugin Support Rick Alday

    (@mrdaro)

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘GiveWP Database Updates stuck at Update 1 of 1’ is closed to new replies.