Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7308 closed enhancement (fixed)

WordPress 2.6 and "Full URL path to files" option

Reported by: gmpfree's profile gmpfree Owned by: ryan's profile ryan
Milestone: 2.6.1 Priority: normal
Severity: normal Version:
Component: General Keywords: upload path url
Focuses: Cc:

Description

just upgraded from 2.5.1 to 2.6, wordpress starts to generate incorrect url for newly uploaded files, even though the file is uploaded to correct directory.

by default, an upgrade will leave the option "Full URL path to files (optional)" as blank, with this config, wordpress 2.6 provides file url as

http://blog.mysite.com/wp-content/uploads/blah.file

instead of custom path specified in "Store uploads in this folder" field; unless i manually update Full URL path to

http://blog.mysite.com/custom-path

it would use the default upload path to generate GUID under wp_posts.

Change History (10)

#1 @mtekk
16 years ago

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

According to DD32 in #7305, if you change the "Store uploads in this folder" setting you must also change "Full URL path to files (optional)" for things to work.

Closing as duplicate of #7305

#2 @santosj
16 years ago

  • Milestone 2.7 deleted

#3 @gmpfree
16 years ago

  • Milestone set to 2.7
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from WordPress 2.6 use default upload path to generate file url. to WordPress 2.6 and "Full URL path to files" option
  • Type changed from defect to enhancement

Sorry mtekk, I disagree.

I am reopening this as enhancement, since default upgrade process DO NOT automatically fill in this option for user, even when "Store uploads in this folder" option is NOT default value.

wordpress 2.6 neither notifies user about this, nor gives enough description about two options' relation.

And it breaks file url, it's a problem you can't dismiss.

#4 @mtekk
16 years ago

The only problem is on upgrade if the user had used a non-default location in the past. If they used a default path, everything works ok, if they don't the added option will break things. If it is possible the upgrade process should try to find a value for "Full URL path to files". Really, this is something that should have been caught (and fixed) before 2.6 was released as the bulk of the damage it will do has already been done. If it is going to get fixed, it should be done for 2.6.1. It isn't documented well in the codex yet, I updated it a bit but it could be explained better.

None-the-less, this is the same problem as described in #7305, it's just that after the upgrading process you notice it rather than making the change while in 2.6 and noticing it when you upload something.

#5 @ryan
16 years ago

  • Owner changed from anonymous to ryan
  • Status changed from reopened to new

#6 @ryan
16 years ago

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

(In [8352]) Derive the upload url from the upload path if no url given. fixes #7308 for trunk

#7 @ryan
16 years ago

(In [8353]) Derive the upload url from the upload path if no url given. fixes #7308 for 2.6

#8 @ryan
16 years ago

Try that out. You can download a new wp-includes/functions.php from here:

http://trac.wordpress.org/export/8353/branches/2.6/wp-includes/functions.php

#9 @ryan
16 years ago

  • Milestone changed from 2.7 to 2.6.1

#10 @gmpfree
16 years ago

tested on my install, no trouble so far, said option is really "optional" now, thx ryan :)

Note: See TracTickets for help on using tickets.