Make WordPress Core

Opened 14 years ago

Closed 4 years ago

#23750 closed enhancement (invalid)

Uploads go into subdirectory install of WordPress

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

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
14 years ago

  • Cc matt@… added

#2 @SergeyBiryukov
14 years ago

  • Component Upload → Multisite

#3 @nacin
14 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
13 years ago

  • Resolution → wontfix
  • Status new → 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
13 years ago

  • Priority normal → low
  • Resolution wontfix
  • Status closed → reopened
  • Type defect (bug) → 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
13 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
13 years ago

  • Component Multisite → Upload
  • Focuses multisite added

#8 @chriscct7
11 years ago

  • Priority low → normal

#9 @afercia
11 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
4 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status reopened → closed
Note: See TracTickets for help on using tickets.