Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7305 closed defect (bug) (duplicate)

Image uploader expects the upload path to be "wp-content/uploads"

Reported by: da3rx's profile da3rX Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.6
Component: Administration Keywords:
Focuses: Cc:

Description

I have changed the default upload path "wp-content/uploads" to something else from the WordPress settings.
Now when I upload an image, it is uploaded to the correct directory BUT the HTML IMG tag's SRC attribute is still showing the default "wp-content/uploads" path (and obviously the image is not displayed). The value is probably hard-coded somewhere.

Attachments (1)

image_url.patch (605 bytes) - added by Txanny 16 years ago.
Patch to solve this problem

Download all attachments as: .zip

Change History (8)

#1 @da3rX
16 years ago

I think this is happening because the "upload_url_path" option has no value in my database and the wp_upload_dir function in wp-includes/functions.php is setting it to the default value:

if ( !$url = get_option( 'upload_url_path' ) )
	$url = WP_CONTENT_URL . '/uploads';

I am not sure where the "upload_url_path" option needs to be set though. Probably when saving the settings.

#2 @da3rX
16 years ago

I filled the "Full URL path to files (optional)" field in Settings > Misc and I think it is working now.

Shouldn't that field be optional? :P

#3 @DD32
16 years ago

Shouldn't that field be optional? :P

Its only optional if you leave the upload path as default.. :P

#4 @da3rX
16 years ago

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

#5 @Txanny
16 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

No, it's not an invalid ticked.

The screen says OPTIONAL, and optional means optional in all cases.
Was optional and worked in all versions but 2.6

If it's no optional anymore, should change the field label, and be filled when updating.

#6 @ryan
16 years ago

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

See #7308 for the fix.

@Txanny
16 years ago

Patch to solve this problem

#7 @thee17
16 years ago

  • Milestone 2.7 deleted
Note: See TracTickets for help on using tickets.