[wp-trac] [WordPress Trac] #57218: undefined function trailingslashit() when .maintenance present - Windows server
WordPress Trac
noreply at wordpress.org
Mon Nov 28 02:33:28 UTC 2022
#57218: undefined function trailingslashit() when .maintenance present - Windows
server
--------------------------+-----------------------------
Reporter: grl570810 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This is the first core bug I've ever reported so apologies if I don't
quite follow correct protocol.
When if I am doing manual updates on any of the sites on my server, and
place a .maintenance file in the site root, instead of getting the nice
‘under maintenance’ message they throw a 500 error like this…
{{{
HP Fatal error: Uncaught Error: Call to undefined function
trailingslashit() in D:\HTTP\WP_Sites\Recipes\wp-includes\class-wp-
textdomain-registry.php:103
Stack trace:
#0 D:\HTTP\WP_Sites\Recipes\wp-includes\l10n.php(784):
WP_Textdomain_Registry->set('default', 'en_AU', 'D:\\HTTP\\WP_Site...')
#1 D:\HTTP\WP_Sites\Recipes\wp-includes\load.php(1401):
load_textdomain('default', 'D:\\HTTP\\WP_Site...', 'en_AU')
#2 D:\HTTP\WP_Sites\Recipes\wp-includes\load.php(278):
wp_load_translations_early()
#3 D:\HTTP\WP_Sites\Recipes\wp-settings.php(74): wp_maintenance()
#4 D:\HTTP\WP_Sites\Recipes\wp-config.php(98):
require_once('D:\\HTTP\\WP_Site...')
#5 D:\HTTP\WP_Sites\Recipes\wp-load.php(50):
require_once('D:\\HTTP\\WP_Site...')
#6 D:\HTTP\WP_Sites\Recipes\wp-blog-header.php(13):
require_once('D:\\HTTP\\WP_Site...')
#7 D:\HTTP\WP_Sites\Recipes\index.php(17): require('D:\\HTTP\\WP_Site...')
#8 {main}
}}}
**NB my server is a Windows machine running PHP 7.4.19 and MySQL 5.7.21.**
I mention this as I believe it’s significant; the issue doesn’t occur if I
put a .maintenance file onto one of the odd WP sites that I manage on a
third party *nix server. My gut feel is that the way Windows uses \ in its
path name rather than / in *nix is probably at the root of the issue.
@harishanker on my original post in the support forum
[https://wordpress.org/support/topic/undefined-function-trailingslashit-
when-maintenance-present/] suggests that the issue arises from changeset
54669 [https://core.trac.wordpress.org/changeset/54669/]
I'll be happy to test any fix on my server using an RC release.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57218>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list