Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#13601 closed defect (bug) (fixed)

Multi-Site -> Media: Incorrect Max Upload Size

Reported by: brandondove's profile brandondove Owned by: nacin's profile nacin
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Media Keywords: has-patch
Focuses: Cc:


"Maximum upload file size" value in the add media box is being pulled from the Network Options->Site upload space even when it's unchecked. Seems like it shouldn't show the restriction or instead show the php ini value in this scenario.

Attachments (3)

Screen shot 2010-05-28 at 11.32.56 AM.png (7.6 KB) - added by brandondove 14 years ago.
Shows unchecked "Site upload space" option
Screen shot 2010-05-28 at 11.33.20 AM.png (23.4 KB) - added by brandondove 14 years ago.
Shows the incorrect results in the media upload thickbox
13601.diff (521 bytes) - added by greuben 13 years ago.

Download all attachments as: .zip

Change History (22)

14 years ago

Shows unchecked "Site upload space" option

14 years ago

Shows the incorrect results in the media upload thickbox

#1 @wpmuguru
14 years ago

  • Keywords reporter-feedback added
  • Owner set to wpmuguru
  • Status changed from new to accepted

Are you using the RC?

#2 @wpmuguru
14 years ago

  • Resolution set to invalid
  • Status changed from accepted to closed

I tested with the RC and got the PHP file size limit. If you have the issue with the RC, please re-open and include what your netowrk options & PHP settings are.

#3 @nacin
14 years ago

  • Milestone 3.0 deleted

#4 @mture
14 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

I have come across the same issue with my WordPress 3.0.1 installation.

My PHP settings (from php.ini) are:

post_max_size = 200M
upload_max_filesize = 200M

My WordPress Network Options -> Upload Settings are:

Site upload space: unchecked, 10MB
Max upload file size: 204800KB

With these settings, the Maximum upload file size hint message in the Add an Image dialog box will display a max size of 10MB.

If I change the value of Site upload space to 5000MB (still unchecked), then the hint message will correctly show a max size of 200MB, reflecting the PHP limits.

#5 @mture
14 years ago

  • Cc mture added

Adding myself to the 'cc' list.

#6 @sillybean
13 years ago

  • Cc steph@… added

#7 @sillybean
13 years ago

I just encountered this as well in a nightly build from a few weeks ago. I forget which one; the db version is 15477.

post_max_size = 150M
upload_max_filesize = 150M

Site upload space: unchecked, 10MB
Max file upload size: 150000KB

The uploader screens all showed (and enforced) a 10MB limit until I increased the site upload space value, leaving it unchecked.

#8 @hakre
13 years ago

What does the "unchecked" mean? That the site upload space should be reflected in the limit?

#9 @sillybean
13 years ago

hakre, if that option is not checked, I would expect that the limit in the text input would not be enforced -- in other words, that there would be no upload limit specific to WordPress, and the php.ini settings would be used instead.

#10 @nacin
13 years ago

  • Keywords needs-patch added; media multisite reporter-feedback removed
  • Milestone set to 3.1

#11 @wpmuguru
13 years ago

If the space limit for a specific sub-site is 20MB, then the upload limit in the uploader should enforce that even if the PHP limit is higher. Otherwise, the setting is misleading.

A use case would be a network where default limit is 20MB & the user can purchase an upgrade to 2GB. In this scenario, the network admin might want to allow a full 2GB upload for the upgraded accounts and set the PHP limit accordingly. Without the individual sub-site setting, the network admin has no easy way to enforce the lower limit.

#12 @nacin
13 years ago

Going to try to review this today. If I don't fix it, or have a chance to review it, I am punting it.

If you care about this bug, please review it and look into it. I will otherwise very likely punt it.

13 years ago

#13 @greuben
13 years ago

  • Keywords has-patch added; needs-patch removed

#14 @ryan
13 years ago

  • Milestone changed from 3.1 to Future Release

Punting all tickets that are not regressions in 3.1.

#15 @nacin
13 years ago

  • Milestone changed from Future Release to 3.1

This is a 3.0 regression (might have been in MU but I don't think so). The fix is small enough that Ryan can go for it. Moving back to 3.1 for now.

#16 @nacin
13 years ago

  • Owner changed from wpmuguru to nacin
  • Status changed from reopened to accepted

#17 @sillybean
13 years ago

Patch tested, works beautifully.

#18 @wpmuguru
13 years ago

That patch looks fine for me. With it applied, the uploader still observed either the PHP max size or the upload max size in the network settings (whichever was smaller).

#19 @nacin
13 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [17085]) Don't check the upload space site option if the option is disabled. props greuben, fixes #13601.

Note: See TracTickets for help on using tickets.