WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 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:

Description

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)

comment:1 ryan4 years ago

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

comment:2 Frumph4 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.

comment:3 Frumph4 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

comment:4 Frumph4 years ago

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

comment:5 nacin4 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.

comment:6 Frumph4 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.

comment:7 ryan4 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.

comment:8 wpmuguru4 years ago

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

comment:9 Frumph4 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

comment:10 wpmuguru4 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.