I recently attempted to upgrade the Genesis framework on one of my client’s staging sites. I received the following error message, but was not able to find documentation of a fix through a quick Google search or via the StudioPress support forum:
Fatal error: Call to undefined function genesis_upgrade_2007() … /wp-content/themes/genesis/lib/functions/upgrade.php on line 425
Since I couldn’t find a solution to my dilemma as quickly as I’d hoped, I went ahead and submitted a support ticket to StudioPress to see if they could offer a quick fix. In the meantime, I decided to go ahead and do a little more troubleshooting on my own. I decided to start by comparing the upgrade.php file on the broken installation to the upgrade.php file on a current working installation.
Here’s what I found in lines 385-429 of the recently upgraded upgrade.php file:
###########################
# UPDATE DB TO VERSION 1700
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘1700’ )
genesis_upgrade_1700();###########################
# UPDATE DB TO VERSION 1800
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘1800’ )
genesis_upgrade_1800();###########################
# UPDATE DB TO VERSION 1901
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘1901’ )
genesis_upgrade_1901();###########################
# UPDATE DB TO VERSION 2001
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘2001’ )
genesis_upgrade_2001();###########################
# UPDATE DB TO VERSION 2003
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘2003’ )
genesis_upgrade_2003();###########################
# UPDATE DB TO VERSION 2005
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘2007’ )
genesis_upgrade_2007();do_action( ‘genesis_upgrade’ );
}
And here’s what I found in lines 385-429 of the upgrade.php file on the working Genesis framework:
###########################
# UPDATE DB TO VERSION 1700
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘1700’ )
genesis_upgrade_1700();###########################
# UPDATE DB TO VERSION 1800
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘1800’ )
genesis_upgrade_1800();###########################
# UPDATE DB TO VERSION 1901
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘1901’ )
genesis_upgrade_1901();###########################
# UPDATE DB TO VERSION 2001
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘2001’ )
genesis_upgrade_2001();###########################
# UPDATE DB TO VERSION 2003
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘2003’ )
genesis_upgrade_2003();###########################
# UPDATE DB TO VERSION 2005
###########################if ( genesis_get_option( ‘db_version’, null, false ) < ‘2006’ )
genesis_upgrade_2006();do_action( ‘genesis_upgrade’ );
}
See the difference? Since the fatal error states “genesis_upgrade_2007()” is an “undefined function”, I decided to simply change the 2007 that appears in the borked upgrade.php file with 2006. VOILA! Success. And a less time-consuming fix than manually reinstalling the whole Genesis framework.
If you’re having the same issue after a recent upgrade to the latest version of Genesis, you may want to try the fix above to see if it resolves your issue. I can’t promise this fix will work for everyone, obviously… but it did work for me. And I hope it will work for you, too.
Good luck!
Social Media Profiles