#19374 closed defect (bug) (wontfix)
Uploader uses wrong path when inserting images
Reported by: | ryanmurphy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Upload | Keywords: | has-patch |
Focuses: | Cc: |
Description
Issue:
I recently had someone whose WordPress install I take care of tell me that when they went to upload images, they weren't being shown. At the time, she was using a svn copy that hadn't been svn up'd in a few weeks. I noticed that the uploads were being stored in the right location, but the uploader was using the default wp-content/uploads
location when it inserted it into the post, causing the images to not show up.
I just confirmed that this still exists in r19456. It happens with all plugins deactivated and on the default theme.
To replicate:
- On the options-media.php, change the upload path to something of your choosing. For mine, I chose
/usr/home/user/domains/my-domain.com/public_html/wp-content/my-uploads/
- If needed, created the folder and adjust permissions.
- Create a new page/post, upload an image, and insert it into the post. Take note of the address, it should be wrong according to the newly set upload path.
- On the server, check the new location, as well as wp-content/uploads. The file will be in the new location (as expected), and not in wp-content/uploads.
Attachments (1)
Change History (9)
#2
@
13 years ago
- Cc kpayne@… added
If I set the path to uploads folder to an absolute path, then I could replicate the failure describe in the ticket.
If I set the path to the uploads folder to a relative path (e.g. wp-content/my-uploads
), as described by dd32, then the uploads worked as indicated. Files went to the correct folder, images displayed correctly in the library, when inserting into a post, and on the public site.
#3
@
13 years ago
- Cc ryan@… added
Sorry it's taken this long for me to reply, I used to get emailed without CC'ing on tickets I created, but I guess that changed.
Replying to dd32:
The upload path in the admin should be set to a relative-to-ABSPATH I believe, and you're also expected to fill out the URL if you change the location. Either (or both) of those 2 assumptions should correct the issue you're seeing.
The settings page does need to be a bit more clear, it also needs to process the data on there, and show some more info (ie. guess the resulting url).
It works when I fill in the URL.
Replying to kurtpayne:
If I set the path to the uploads folder to a relative path (e.g. wp-content/my-uploads), as described by dd32, then the uploads worked as indicated. Files went to the correct folder, images displayed correctly in the library, when inserting into a post, and on the public site.
Works for me too once I change it to a relative location.
I've attached a patch which adds more information to the URL setting
#5
@
11 years ago
- Keywords needs-refresh added
upload_path and upload_url_path option fields hidden if set to default in options-media.php in [21852]. We should still update the description when those fields are shown.
#6
@
11 years ago
19374.diff seems fine but I don't care too much. Given [21852] (which basically deprecated this UI), close it?
The upload path in the admin should be set to a relative-to-ABSPATH I believe, and you're also expected to fill out the URL if you change the location. Either (or both) of those 2 assumptions should correct the issue you're seeing.
The settings page does need to be a bit more clear, it also needs to process the data on there, and show some more info (ie. guess the resulting url).