[wp-trac] [WordPress Trac] #63104: Undefined constant "BLOGUPLOADDIR" for subdirectory multisites
WordPress Trac
noreply at wordpress.org
Mon Mar 17 09:09:20 UTC 2025
#63104: Undefined constant "BLOGUPLOADDIR" for subdirectory multisites
--------------------------------+------------------------------
Reporter: danielpw | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 6.7.2
Severity: normal | Resolution:
Keywords: has-testing-info | Focuses: multisite
--------------------------------+------------------------------
Comment (by saurabh.dhariwal):
Test Case: Fatal Error on Navigating to /wp-content/files/ in Subdirectory
Multisite
Title: Verify if navigating to /wp-content/files/ triggers a fatal error
in a subdirectory multisite setup
Test Type: Functional, Regression
Environment:
WordPress Multisite (Subdirectory Setup)
PHP Version: 8.1
Debug Mode: Enabled (define('WP_DEBUG', true); define('WP_DEBUG_LOG',
true); define('WP_DEBUG_DISPLAY', false);)
Plugins: Minimal active plugins
Theme: Default Twenty Twenty-five
Preconditions:
WordPress is installed and configured as a Subdirectory Multisite.
Pretty permalinks are enabled.
No custom rules affecting /wp-content/files/ are present in .htaccess
or Nginx configuration.
The database is backed up before testing.
Steps to Reproduce:
Open a browser and navigate to https://example.com/wp-content/files/.
Observe the response from the server.
Check the PHP error log (wp-content/debug.log or server logs) for any
fatal errors.
Repeat the test with different sub-sites:
https://example.com/subsite1/wp-content/files/
https://example.com/subsite2/wp-content/files/
If no error occurs, manually inspect ms-files.php to verify whether
BLOGUPLOADDIR is defined.
Expected Result:
The page should return a 404 Not Found or a proper redirection if the
file handler is working correctly.
No Fatal Error should occur.
BLOGUPLOADDIR should be properly defined before being used in ms-
files.php.
Actual Result:
[PASS] No fatal error occurs, and a "Page Not Found" message is
displayed.
[FAIL] A fatal error appears in ms-files.php, indicating BLOGUPLOADDIR
is undefined.
Post-Test Actions:
If the fatal error is confirmed, check the WordPress core file ms-
files.php for incorrect reference to BLOGUPLOADDIR.
If no error occurs, verify the issue with different PHP versions and
fresh WordPress installations.
Additional Notes:
If the fatal error is reproducible, consider defining BLOGUPLOADDIR in
wp-config.php as a workaround.
If the issue is not reproducible, it may have been resolved in newer
WordPress versions or specific server configurations.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63104#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list