Path (file) in postmeta is incorrect after editing image
|Reported by:||waltervos||Owned by:|
|Severity:||normal||Keywords:||needs-patch image-editor postmeta attachments|
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 ...) )
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.
Change History (4)
- Keywords changed from needs-patch, image-editor, postmeta, attachments to needs-patch image-editor postmeta attachments