[wp-trac] [WordPress Trac] #11115: Path (file) in postmeta is incorrect after editing image

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 10 11:15:54 UTC 2009


#11115: Path (file) in postmeta is incorrect after editing image
--------------------------+-------------------------------------------------
 Reporter:  waltervos     |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.9
Component:  Media         |     Version:  2.9
 Severity:  normal        |    Keywords:     
--------------------------+-------------------------------------------------
 The image editor is buggy on my install. Uploading is still fine, but as
 soon as I start making edits the file paths in postmeta start to break.
 Here's what happens:

 I upload an image and flip or crop it (the only edits I tried). I then
 save the image. When I check my database I see the my
 wp_attachment_metadata has changed from:

 {{{
 array (
   'width' => '3008',
   'height' => '2000',
   'hwstring_small' => 'height=\'85\' width=\'128\'',
   'file' => '2009/11/DSC_0100.JPG',
   (... cut out ...)
 )
 }}}
 to:

 {{{
 array (
   'width' => '2105',
   'height' => '1278',
   'hwstring_small' => 'height=\'77\' width=\'128\'',
   'file' => 'C:Program FilesApache Software
 FoundationApache2.2htdocswordpress/wp-
 content/uploads/2009/11/DSC_0100-e1257850248955.JPG',
   (... cut out ...)
 )
 }}}

 At this point I can still make new edits to the image. However, as soon as
 I restore the original image the _wp_attached_file field in postmeta also
 break. Instead of 2009/11/DSC_0100.JPG it now reads C:Program FilesApache
 Software FoundationApache2.2htdocswordpress/wp-
 content/uploads/2009/11/DSC_0100-e1257850248955.JPG. After this I also
 can't make any new edits to the file anymore.

 I tried this a couple of times so I'm pretty sure these are the triggers
 and responses for this bug. I have however only tried cropping and
 flipping the image and I have only tried it on Windows locally. It may
 work on linux installs.

 This is my first bug report so please add to it if you're missing
 information or ask me for it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11115>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list