#63285 closed defect (bug) (fixed)
Call to undefined function is_super_admin() in /wp-includes/ms-files.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8.1 | Priority: | normal |
Severity: | major | Version: | 6.8 |
Component: | Networks and Sites | Keywords: | dev-reviewed fixed-major |
Focuses: | multisite | Cc: |
Description
After the release of 6.8, we have observed fatals across certain multisites.
Specifically, when certain files are requested. E.g., /example/files/2014/01/img_1234.jpg
which reults in HTTP 500 and the fatal error below.
PHP Fatal error: Uncaught Error: Call to undefined function is_super_admin() in /wordpress/core/6.8/wp-includes/ms-files.php:23 Stack trace: #0 {main} thrown in /wordpress/core/6.8/wp-includes/ms-files.php on line 23
This appears related to https://core.trac.wordpress.org/changeset/59967
ms-files.php leverages define( 'SHORTINIT', true );
which makes is_super_admin()
unavailable.
Props @jmdodd for noticing the bump in related fatals.
Change History (18)
#3
@
5 weeks ago
wp-includes/capabilities.php
can't be loaded with SHORTINT. I think we will need to revert [59967]
#4
@
5 weeks ago
This looks like it will fatal on anything still using ms-files for media, so any WP multisite created before 3.5 and not manually converted after.
I think we will need to revert [59967]
Heavy plus one.
This ticket was mentioned in PR #8694 on WordPress/wordpress-develop by @jorbin.
5 weeks ago
#6
- Keywords has-patch added
#7
@
5 weeks ago
- Keywords needs-patch added; has-patch removed
Based on this only affecting older multisites or multisites that have manually converted to use ms-files, I think we don't need to rush 6.8.1 out the door.
@verygoode If you are looking to update your multisite to take advantage of the removal of ms-files from 2012, https://halfelf.org/2012/dumping-ms-files/ may be helpful.
#9
@
5 weeks ago
- Keywords needs-patch added; has-patch needs-testing removed
#63104 is another ms-files.php
related ticket, opened on March 15.
Only noting here because it seems highly coincidental.
#10
@
5 weeks ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 60170:
#11
@
5 weeks ago
- Keywords dev-feedback added; needs-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
- Version changed from trunk to 6.8
Reopening for merging [60170] to the 6.8 branch pending another committers review.
This ticket was mentioned in Slack in #core by jorbin. View the logs.
5 weeks ago
#13
@
5 weeks ago
- Keywords dev-reviewed fixed-major added; dev-feedback removed
[60170] looks good to backport to the 6.8 branch.
#15
@
4 weeks ago
I have the same issue in my multisite that all images are missing in some of the subsites.
But not in all of the subsites. Only some are affected. But the behaviour is not consistent and weird.
First almost all sub websites were affected by this.
Then i restored the complete server and retried and some were ok and some were not. But i had more that were ok than the first time i upgraded wp to 6.8.
I tried again a full restore and got even more websites that were ok. Only 3 left with missing images.
Reverting line 24 in ms-files.php to what it was in wp 6.7.2 fixes the issue for the remaining 3 websites.
if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) {
#17
in reply to:
↑ 16
@
4 weeks ago
Replying to pgsmarketing:
Thanks to @neo2k23 - that temporary fix helped my multisite.
it is not my fix.. i just followed above instructions posted by @audrasjb in this link
https://core.trac.wordpress.org/changeset/59967
for which i am gratefull as it fixed the problem.
#18
@
3 weeks ago
6.8.1 RC1 is now available for testing and includes a fix for this issue. Please help test before the final release https://make.wordpress.org/core/2025/04/28/wordpress-6-8-1-rc1-is-now-available/
Hi @verygoode,
You say "certain multisites". Have you identified anything in common so far with the ones that experience this problem?