[wp-testers] sorta an off the wall bug
Otto
otto at ottodestruct.com
Thu Jun 21 18:50:47 UTC 2012
On Thu, Jun 21, 2012 at 1:41 PM, Philip M. Hofer (Frumph)
<philip at frumph.net> wrote:
> actually no, but it does return with the old /home/funk/wp-content/uploads/
>
> { ["error"]=> string(142) "Unable to create directory
> /home1/tkdanimc/public_html/nikkisprite/wp-content/uploads/2012/06
>
> string(71)
> "/home/tdoherty/public_html/nikkisprite.com/wp-content/themes/comicpress"
>
> tkdanimc = old site
> tdoherty = new site
>
> the /home1/tkdanimc/public_html/nikkisprite/wp-content/uploads is what was
> found in the upload_path
>
>
> so somewhere I cannot read where it doesn't strip out the old ABSPATH
> portion properly
No, it doesn't strip out the old ABSPATH portion *at all*, because it
has no way to know what the old ABSPATH portion is. It can't do what
you're thinking it can do.
Look, you're looking at this all wrong and backwards here.
1. The upload_path setting is an option in the database.
2. If you have it set to an absolute path, then yes, it will attempt
to use that absolute path, hell or high-water. This is desired
behavior, because maybe I want my uploads to go somewhere special on
my server.
3. If you have it set to a relative path, then it's assumed to be
relative to the ABSPATH, whatever that is currently.
This is all correct behavior. There's no code errors there.
The question you're asking is the wrong one. What you need to find is
this: "Why was the upload_path set to an absolute path?"
At some point in the past, something happened somewhere that caused
that upload_path to be set to an absolute path. When you moved the
system, that bit you, and yes, it bit you correctly. The setting was
wrong and should not have been absolute.
But, the setting does not *default* to an absolute path, and WordPress
does not try to convert it from an absolute path to a relative one if
you have explicitly changed it to be absolute. When you put in
/foo/bar/whatever on that Settings-Media page, it assumes you know
what you're doing and takes your setting at face value.
-Otto
More information about the wp-testers
mailing list