WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#7118 closed defect (bug) (invalid)

New media uploader uploads files to the wp-admin directory.

Reported by: jleuze Owned by: ryan
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords: uploader, wp-admin, wrong, folder
Focuses: Cc:

Description

I searched through the tickets and didn't find any uploader bugs that were similar to mine, but I apologize if this is a duplicate.

I have 2.5.1 installed on a standard shared web hosting package at Network Solutions. I can upload images, but after they have uploaded, I cannot see any thumbnails, and if I insert the image into a post, it generates a broken link.

I have WordPress installed in the root of my website, and the upload folder is standard(wp-content/uploads), but when I FTP into my site, no files have been added in that directory.

The files are being uploaded, but they are in wp-admin/wp-content/uploads. No matter what I do, or how I edit my upload path, the files are uploaded somewhere in my wp-admin directory.

Searching through the WordPress support forums, I have found several other people who are also having this problem with the uploader

I followed all of Otto42's suggestions in a sticky post in the forum, and nothing seems to affect the results I am having.

I have posted in greater detail about this problem on the WordPress forum:
http://wordpress.org/support/topic/180107

If I can provide more details about this bug to anyone, I would be happy to do so.

Change History (9)

comment:1 Otto426 years ago

Somehow, their ABSPATH variable is not getting included in the path returned by wp_upload_dir.

See this forum thread for details:
http://wordpress.org/support/topic/182297

comment:2 Otto426 years ago

Ref: Ticket #5953

comment:3 follow-up: ryan6 years ago

Maybe lose the realpath() check and see if that helps.

comment:4 ryan6 years ago

  • Owner changed from anonymous to ryan

comment:5 in reply to: ↑ 3 ; follow-up: jleuze6 years ago

Replying to ryan:

Maybe lose the realpath() check and see if that helps.

What do I have to edit to accomplish this?

comment:6 in reply to: ↑ 5 ; follow-up: Otto426 years ago

Replying to jleuze:

What do I have to edit to accomplish this?

wp-includes/functions.php, around line 1054.

In the function path_is_absolute, there's these two lines:

if ( realpath($path) == $path )
	return true;

Remove or comment them out. See if that changes anything.

comment:7 in reply to: ↑ 6 jleuze6 years ago

Replying to Otto42:

Remove or comment them out. See if that changes anything.

For some unknown reason, last week my blogs started to upload files correctly. This change was spontaneous, I didn't change anything on my end.

I even tried over from scratch with a fresh install of WordPress and a new database, and my uploader still works. Which is a good thing I suppose!

But it is strange, I can only guess that my webhost, Network Solutions, made some adjustment that is causing the uploader to function correctly.

I am sorry, since my problem fixed itself, I won't be able to help you with this bug.

comment:8 ryan6 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:9 mrmist5 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Severity changed from critical to normal
  • Status changed from new to closed

The OP says this works now, so closing as invalid.

Note: See TracTickets for help on using tickets.