Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#13828 closed defect (bug) (fixed)

multisite fileupload_url option not being created for subdirectory installations

Reported by: Frumph Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords:
Focuses: Cc:


fileupload_url which is used to determine the url path to the /files redirect is not being added upon the creation of a multisite subdirectory installation

Change History (10)

#1 @ryan
5 years ago

That option is set in a couple places but is never actually referenced in core code. It looks like a dead option.

#2 @Frumph
5 years ago

it's in the rewrite rules to find /files and go to the

RewriteRule files/(.+) wp-includes/ms-files.php?file=$1 [L]

It's a very important redirect.

#3 @Frumph
5 years ago

subdirectory installation rewrite is get_option('siteurl') . /subdir/files and on subdomain is just get_option('siteurl') . /files

needs to be done on mainsite when upgrading to be added

#4 @Frumph
5 years ago

erm mainsite for both on creation is siteurl . /files but when creating new subdirectory is /subdir/files

#5 @nacin
5 years ago

But why does it need to be an option? Neither of us see it used anywhere. Even in MU it was only set once and never referenced otherwise.

#6 @Frumph
5 years ago

Fine get rid of it, i'll just have to tell everyone not to upgrade until I change over to using wp_upload_dir() to get the path info's which was not introduced until recently.

It's all good., I was just hoping for backward compatibility since fileupload_url was what was used to reference the /files location for the redirect.

#7 @ryan
5 years ago

Looking in branches/2.6 for MU, I don't see it being used there either. I wonder if this option has ever been used internally.

#8 @wpmuguru
5 years ago

(In [15202]) alway update fileupload_url during initial network install, see #13828

#9 @Frumph
5 years ago

does this also guarantee that upload_path is also set just in case it doesn't? I haven't pathed if that is set or not previously

#10 @wpmuguru
5 years ago

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

The reason the fileupload_path wasn't being set was that the upload_path was set. It didn't have anything to do with a subdir install. It was setting the fileupload_path if upload_path was empty.

Now it does it without regard to the original state of upload_path.

Note: See TracTickets for help on using tickets.