Ticket #7308 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

WordPress 2.6 and "Full URL path to files" option

Reported by: gmpfree Owned by: ryan
Priority: normal Milestone: 2.6.1
Component: General Version:
Severity: normal Keywords: upload path url
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

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

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

  • Milestone 2.7 deleted
  • Status changed from closed to reopened
  • Type changed from defect to enhancement
  • 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
  • Resolution duplicate deleted
  • Milestone set to 2.7

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.

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.

comment:5   ryan4 years ago

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

comment:6   ryan4 years ago

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

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

comment:7   ryan4 years ago

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

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

comment:9   ryan4 years ago

  • Milestone changed from 2.7 to 2.6.1

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

Note: See TracTickets for help on using tickets.