WordPress.org

Make WordPress Core

#23177 closed defect (bug) (fixed)

Automatic upgrade from 2.7 to 3.5 fails with bad path

Reported by: dd32 Owned by: nacin
Milestone: 3.5.1 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: needs-patch fixed-major
Focuses: Cc:

Description

I've just had a report of the Automatic Upgrade failing for a 2.7 -> 3.5 blog, and unfortunately I've duplicated it.

The error message in this case is:

( ! ) Warning: copy(/media/sf_www/branches/2.7/wp-contentupgrade/version-current.php): failed to open stream: No such file or directory in /media/sf_www/branches/2.7/wp-admin/includes/class-wp-filesystem-direct.php on line 122

It looks like the WP_Filesystem wp-content directory function changed at some point to return trailingslashes, but back-compat wasn't taken into consideration in the upgrade routines.

Although this is most likely only going to need an extra trailingslashit() applied to a path, it'd be nice to know when the bug was introduced.

Change History (4)

comment:1 dd3215 months ago

  • Milestone changed from 3.6 to 3.5.1

This was introduced in [22227] for #21789 for 3.5 (by yours truly), pushing to 3.5.1

comment:2 dd3215 months ago

In 23297:

Core Update: Fix a issue which caused automatic upgrades from 2.7 to 3.5+ to fail. Pre-2.7 WP_Filesystem::wp_content_dir() returned unslashed paths. Introduced in [22227]. See #23177

comment:3 dd3215 months ago

  • Keywords fixed-major added

$wp_filesystem->wp_content_dir() started returning trailingslashes in 2.8.

[23297] was tested on a affected 2.7 install, should be right for a 3.5-branch commit as well.

comment:4 nacin15 months ago

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

In 23324:

Core Update: Fix a issue which caused automatic upgrades from 2.7 to 3.5+ to fail. Pre-2.7 WP_Filesystem::wp_content_dir() returned unslashed paths. Introduced in [22227].

Merges [23297] to the 3.5 branch.

props dd32
fixes #23177

Note: See TracTickets for help on using tickets.