sewpafly / post-thumbnail-editor

Wordpress Plugin to manually edit post thumbnails
http://wordpress.org/extend/plugins/post-thumbnail-editor/
32 stars 18 forks source link

full image area is not available to crop #53

Closed montchr closed 11 years ago

montchr commented 12 years ago

I posted this to the support page on wordpress.org but I figured it wouldn't hurt to post here as well.

When I go to crop, the image above the Create Thumbnails button does not show the full image available. The croppable area is actually a cropped version of the original file.

In the image sizes on the right that match the original image's aspect ratio, I can see that there is much more to the original image than what the croppable area is telling me.

Even for vertical images, the croppable area remains in the same almost-square shape and size for every image no matter what its proportions are.

Example Image 1

Also, this happens when I try and crop:

Example Image 2

I've disabled all plugins to test for any conflicts but there were none — the problem still happens.

montchr commented 12 years ago

Nevermind. It turned out it was a space that I missed in functions.php

sewpafly commented 12 years ago

Thanks for updating with the solution!

montchr commented 12 years ago

Well, it worked for a little while...

I can't figure out what the hell is going on. I've gone over my code several times, even checked out the old commit I made when it was working. It was still broken. That made me think it was a plugin, but I've deactivated all of them. Still this problem persists.

I even noticed that there are extra lines at the end of the plugin php files. I removed them. No difference.

I'm totally lost here, and the worst part is that the site that I manage uses this plugin a lot. Can you help?

sewpafly commented 12 years ago

What version of the image do you see in the wordpress image editor? (I'm borrowing from this code, so I would imagine that this is the same picture). Does this happen for every picture?

If you look in the debug tab you'll see some debug statements, specifically one that starts with "META". Look for the part that contains the file information. Verify that this is pointing to the right image on the disk. (This meta information only gives a relative path from the uploads directory)

montchr commented 12 years ago

I'm running into both of the problems I posted images of. I've mainly been experimenting with that vertical image of the buildings, but I uploaded another (different) image and it's doing the same thing.

The file listed is correct, and that goes for other images on my site too. If I copy the URL and open it in a new tab, it loads full size with the proper proportions.

sewpafly commented 12 years ago

so what happens in the wordpress image editor?

montchr commented 12 years ago

The same thing, actually...

Imgur

sewpafly commented 12 years ago

It sounds like it's probably a wordpress issue, however, there might be one other thing that you can try. Try to crop the image in the wordpress image editor and see if the problem goes away. Even if the problem doesn't go away, try to rollback the crop (I believe the feature is called "restore original image"). Hopefully this clears out any caching that might have occured in the database... Other than that, I don't know what else to try. Maybe your theme has some extra lines at the end of a .php file?

montchr commented 12 years ago

Hmm.... It is looking more and more like an issue with wordpress. With everything deactivated, including this plugin, I switch to the TwentyEleven theme and try to crop in the image editor and it doesn't save my crop correctly. If I insert the image into a post it shows an image with a black bar on the edge, like in the screenshot above. Restoring the original image doesn't do anything.

I guess this is beyond the scope of your plugin at this point...