Make WordPress Core

Opened 11 years ago

Closed 16 months ago

#23750 closed enhancement (invalid)

Uploads go into subdirectory install of WordPress

Reported by: jondavidjohn's profile jondavidjohn Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Upload Keywords: close
Focuses: multisite Cc:

Description

In upgrading a few sites to WordPress 3.5 and then giving WordPress its own directory (wp/), we continually see the uploads end up in wp/wp-content/blogs.dir instead of wp-content/blogs.dir.

For the time being as a work around we have enabled a network wide plugin that consists of

function ms_upload_fix($uploads) {
	$uploads['path'] = str_replace('/wp/', '/', $uploads['path']);
	$uploads['basedir'] = str_replace('/wp/', '/', $uploads['basedir']);
	return $uploads;
}
add_filter('upload_dir', 'ms_upload_fix');

We do have WP_CONTENT_DIR defined and assume it should use this if set.

Change History (10)

#1 @bigdawggi
11 years ago

  • Cc matt@… added

#2 @SergeyBiryukov
11 years ago

  • Component changed from Upload to Multisite

#3 @nacin
11 years ago

There may very well be a bug here to fix, and I'd like to. That said:

  • blogs.dir is only supported for networks installed prior to 3.5.
  • Installing WordPress in a subdirectory is only supported for networks installed in 3.5 or later.

Shifting an older install to a subdirectory was never tested, at least not with blogs.dir, which would probably explain why this was missed.

#4 @Ipstenu
11 years ago

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

I'm not sure this IS a bug.

wp-content IS in /wp/wp-content right? I mean, you're running WP out of a sub directory. Unless you ALSO moved the wp-content folder (possible), it's in the right place.

Boldly #wontfix

#5 follow-up: @nacin
11 years ago

  • Priority changed from normal to low
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Type changed from defect (bug) to enhancement

Based on:

We do have WP_CONTENT_DIR defined and assume it should use this if set.

I'm going to assume that jondavidjohn has indeed excluded /wp/ from that.

I'm fine with "fixing" this (per my comment) but I will note that it's more or less an enhancement, to support blogs.dir + WordPress in a subdirectory.

#6 in reply to: ↑ 5 @jondavidjohn
11 years ago

Replying to nacin:

I'm fine with "fixing" this (per my comment) but I will note that it's more or less an enhancement, to support blogs.dir + WordPress in a subdirectory.

Agree, likely more trouble than it's worth at this point. As we have a workaround and are now aware of the issue.

Installing WordPress in a subdirectory is only supported for networks installed in 3.5 or later.

Understood.

#7 @jeremyfelt
10 years ago

  • Component changed from Multisite to Upload
  • Focuses multisite added

#8 @chriscct7
9 years ago

  • Priority changed from low to normal

#9 @afercia
8 years ago

  • Keywords close added; needs-patch removed

Two years from the last feedback and seems an extremely edge case. I'd propose to close this ticket :) @jeremyfelt any thoughts?

#10 @JeffPaul
16 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.