[wp-trac] [WordPress Trac] #59020: Critical error during database update and patterns directory
WordPress Trac
noreply at wordpress.org
Wed Aug 9 15:18:59 UTC 2023
#59020: Critical error during database update and patterns directory
---------------------------+------------------------------
Reporter: margaritaperc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.3
Severity: critical | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by margaritaperc):
Thank you very much for your fast reply!
A. If I update through the button in the backend:
- in the browser I see the critical error page: http://example.com/wp-
admin/upgrade.php?_wp_http_referer=%2Fcore%2Fwp-
admin%2Fabout.php%3Fupdated
- and on debug.log, I get the following message:
{{{
[09-Aug-2023 15:00:46 UTC] PHP Fatal error: Uncaught Error: Undefined
constant "THEME_CONSTANT" in /path-to-theme/wp-content/themes/theme-name
/pattern-example.php:200
Stack trace:
#0 /path-to-theme/core/wp-includes/block-patterns.php(480): include()
#1 /path-to-theme/core/wp-includes/class-wp-hook.php(310):
_register_theme_block_patterns('')
#2 /path-to-theme/core/wp-includes/class-wp-hook.php(334):
WP_Hook->apply_filters(NULL, Array)
#3 /path-to-theme/core/wp-includes/plugin.php(517):
WP_Hook->do_action(Array)
#4 /path-to-theme/core/wp-settings.php(632): do_action('init')
#5 /path-to-theme/wp-config.php(112): require_once('/Users/...')
#6 /path-to-theme/core/wp-load.php(55): require_once('/Users/...')
#7 /path-to-theme/core/wp-admin/upgrade.php(18): require('/Users/...')
#8 /Users/a/.composer/vendor/laravel/valet/server.php(110):
require('/Users/...')
#9 {main} thrown in /path-to-theme/wp-content/themes/theme-name/patterns
/pattern-example.php on line 200
}}}
B. If I update through wp cli:
- the **wp core update** shows no error on the console, but in the browser
I can see again the critical error page: http://example.com/wp-
admin/upgrade.php?_wp_http_referer=%2Fcore%2Fwp-
admin%2Fabout.php%3Fupdated
- and when i run **wp core update-db** I can see the same error as in the
debug.log.
I didn't write that it concerned only multisite. But I've just tested it
as well and strangely enough on multisite the update process could be
completed, although the **wp core update-db** still generates the same
error on the console.
Let me know, if you need any more infos.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59020#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list