Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author sewpafly

    (@sewpafly)

    Try hitting f5 or the refresh button…

    I love the concept of this plugin, but I’m having exactly the same problem as thehen2. I’ve refreshed my browser and even cleared the cache, but the post thumbnail which I edited with PTE is not saved. In fact, after I attempt to save, PTE gives me a totally blank white window.

    Can you please resolve this?

    Thanks,

    Fred

    Plugin Author sewpafly

    (@sewpafly)

    I need more information. Does this get to step two? Step three? If you can go into post_thumbnail_editor.php and set the debug flag to true and then capture the output in firebug or chrome’s developer section/console that would be great. I can write up some better instructions if you need it.

    Also, what browser are you using? What version of php? What version of wordpress? Thanks for helping me make this a better plugin.

    Update: Here’s some additional information which should be useful. I used the cPanel File Manager to explore my media directory, and I found that the post thumbnail was saved, but in an unexpected place: the ptetmp/1839 subdirectory of my media directory! I can copy the new thumbnail into the media directory to overwrite the old one, but it would be much more convenient if I didn’t have to do this extra step manually.

    Clarification: I don’t have a problem until I click on “Okay, these look good.” After that, I get a blank white window. The new thumbnail is actually being saved, but in the wrong place: the ptetmp/1839 subdirectory of my media directory.

    I’m using WordPress 3.2.1, PHP 5.2.16, and Google Chrome 12.0.742.122.

    Is this enough information for debugging purposes?

    Plugin Author sewpafly

    (@sewpafly)

    Okay, so it looks like going from step 2 to step 3 is failing. That moves the file from the tmpdir to the correct position and updates wordpress’s database with the new location.

    Can you look and see what the file permissions are on the image in the ptetmp dir?

    It would also be great if you could change the PTE_DEBUG flag in post_thumbnail_editor.php to true and then in Chrome, press F12 and look at the console for the debug messages. (It might help to look at the Network tab and find the latest admin_ajax.php call and see what the headers and response messages are.

    Plugin Author sewpafly

    (@sewpafly)

    I need to add some code that makes testing/debugging easier.

    I’ve done the debugging you asked. I also have some additional observations which may prove useful.

    Here’s a clarification: After I click “Okay, these look good,” I get a white window which is totally blank except for the title “Post Thumbnail Editor” at the top. In the black bar directly over the white window, it says “Edit Thumbnails” on the left and has an “X” to exit on the right. Other than that, there’s nothing there.

    The file permissions on the ptetmp directory and the 1858 subdirectory are both 755. The file permissions on the thumbnail image are 644. That all seems fine.

    Using the Google Chrome developer tools Network tab, I checked the last admin_ajax.php call.

    There’s an error message under the Content tab:

    {"error":["Invalid Parameters: can't find sizes"]}

    Here’s what the Headers tab contains:

    Request URL:https://www.fwchapman.com/wp-admin/admin-ajax.php?id=1858&action=pte_ajax&pte-action=confirm-images&pte-nonce=c2e28df012
    Request Method:GET
    Status Code:200 OK

    Request Headers

    Accept:application/json, text/javascript, */*; q=0.01
    Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
    Accept-Encoding:gzip,deflate,sdch
    Accept-Language:en-US,en;q=0.8
    Connection:keep-alive
    Cookie:wordpress_sec_2ae30f6194251507416c1008bd577cdc=admin_G3f6zy7jDhfvCdTn%7C1312042344%7C49a05acf5f8609381418c86ab45c9058; wordpress_test_cookie=WP+Cookie+check; wp-settings-3=hidetb%3D1%26editor%3Dtinymce%26m0%3Do%26urlbutton%3Dnone%26align%3Dright%26imgsize%3Dfull%26m4%3Do%26m1%3Do%26wplink%3D1%26m2%3Do%26m6%3Do%26m3%3Do%26m5%3Do; wp-settings-time-3=1311867303; wp-settings-2=hidetb%3D1%26m4%3Dc%26m5%3Dc%26m9%3Dc%26m10%3Dc%26m6%3Dc%26editor%3Dtinymce%26m7%3Do%26m8%3Do%26m1%3Dc%26m2%3Do%26m3%3Dc%26m0%3Do%26m11%3Do%26tml1%3D0%26tml0%3D0; wp-settings-time-2=1311868993; wordpress_logged_in_2ae30f6194251507416c1008bd577cdc=admin_G3f6zy7jDhfvCdTn%7C1312042344%7C4d75351469715a598b14add435f82c49
    Host:www.fwchapman.com
    Referer:https://www.fwchapman.com/wp-admin/admin-ajax.php?action=pte_ajax&pte-action=launch&id=1858&
    User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30
    X-Requested-With:XMLHttpRequest

    Query String Parameters view URL encoded

    id:1858
    action:pte_ajax
    pte-action:confirm-images
    pte-nonce:c2e28df012

    Response Headers

    Cache-Control:no-cache, must-revalidate
    Connection:Keep-Alive
    Content-Type:text/html; charset=UTF-8
    Date:Thu, 28 Jul 2011 16:16:03 GMT
    Expires:Sat, 26 Jul 1997 05:00:00 GMT
    Keep-Alive:timeout=3, max=100
    Server:Apache
    Transfer-Encoding:chunked
    X-Content-Type-Options:nosniff
    X-Frame-Options:SAMEORIGIN
    X-Powered-By:PHP/5.2.16

    In case it’s relevant, I’m using the Delicious child theme of the Genesis framework from StudioPress:

    https://demo.studiopress.com/delicious

    For each image in the media library, the theme adds three additional images: slider (435×235), slider thumbnail (112×60), and small thumbnail (60×60).

    I just noticed an additional anomaly: In Step 1, on the right side, PTE lists all six images (thumbnail, medium, large, plus the three theme-specific images), but it does not display the medium (450×450) and large (665×665) images. In addition, the “current image” sizes for the medium and large images are missing.

    Actually, the original image was smaller than both the medium and large image sizes, and those images were never created.

    That probably explains the “can’t find sizes” error message! I’m guessing that it’s just a matter of adding some code to check whether the image files exist.

    I hope this information helps you improve your plugin, which provides an essential WordPress function. I wouldn’t want to be without it!

    Thanks for all your help and hard work,

    Fred

    Plugin Author sewpafly

    (@sewpafly)

    Thanks for the information I think that is exactly what I needed…

    The reason that going from step2 -> Step 3 is failing is because it doesn’t appear to be selecting any images. (at least that information isn’t being passed in the http request). Can you confirm that all the images are selected in step 2 by clicking the “All” button before you click, “Okay, these look good…”.

    If you are still getting the same error then open the javascript console and look for the “Confirming” message. The message after it should be able to be expanded and I need to know what is in the pte-confirm variable (this can be expanded as well).

    I have seen the problem that you are describing with the original image being smaller than the other images and you can force them to upsample with this plugin by selecting the sizes on step one and step 2 will show you what they would look like. If you confirm them (once step 3 is working for you) they will be written to the correct spot and you will not see that error again.

    I repeated Step 2. The selection box is already checked. I clicked on the All link anyway, but still had the same problems as before.

    Here’s what the JavaScript console says (with everything expanded):
    [Code moderated as per the Forum Rules. Please use the pastebin]

    I hope this helps,

    Fred

    Plugin Author sewpafly

    (@sewpafly)

    I was able to capture your log messages from the email, I’m not at a computer where I can test this yet, but it looks like everything there is okay. I don’t understand though why in the javascript debug you see that the pte-confirm object has a ‘small-thumbnail’ property (however the undefined next to that seems a little bizarre), but then in the HTTP headers, pte-confirm is actually not being sent… I’ll see if I can come up with a test case for you to try…

    Really all the code needs is a list of images and a ID to confirm that those images should be saved (if the list is null then it creates the blank page that you see — I have duplicated that error). I don’t understand why if you have images selected it’s not sending that information back to the server.

    https://github.com/sewpafly/post-thumbnail-editor/issues/20

    I found that if I edit a batch of thumbs but there are more than one with the same exact dimensions, I get the blank screen and some of the thumbs don’t get created. While I haven’t looked too deeply into this, I believe that only one copy of the duplicate thumbs actually exists and something is going wrong when a second one is edited. This can be seen by editing one of them (in my case a 200×200 pixel thumb) and noticing that all the same sized thumbs change.

    I hope this helps.

    Plugin Author sewpafly

    (@sewpafly)

    @stuartist – Thanks for your input, I’m getting frustrated that I can’t duplicate this problem. Can you walk me thourgh what happens exactly?

    From my reading it sounds like you get to the first screen, select an area to crop from and select multiple thumbnails, then you click “Create Thumbnails”. At this point do you get the blank screen? Or does it come after the next step when you confirm the images?

    What do you mean all the same sized thumbs change? I assume that if you go back to the first screen the thumbs are the same as they were on the confirmation screen? Are they in the ptetmp directory? Did only a couple get put into the ptetmp directory?

    It happens after I confirm the images.

    I’m using a theme from Elegant Themes. It has several different thumbnail sizes defined. However, some are the same size. For example, pageimage, blogcat, and singleblog are all 200×200. I suppose this would allow a person to modify the sizes individually when modifying the theme.

    There are two scenarios:
    1. More than one thumbnail in the selected set has the same size.
    2. Each thumbnail in the selected set has a different size.

    Scenario 1 will cause the problem. In addition, the other thumbnails in the selected set with the same aspect ratio but different sizes may not be updated.

    Scenario 2 will work properly. The result is that all the same sized thumbnails are updated and any additional thumbnails are also updated.

    As for what ends up in the ptetmp directory, I’ll have to give that another try and have a look. It’s a bit late now so that will be tomorrow morning.

    Plugin Author sewpafly

    (@sewpafly)

    I’m guessing that the thumbnails that have the same size, actually all share the same URL (so when you change one, you change them all). Which should explain scenario #2. I’m not sure about scenario #1, but it sounds similar to the other issues in this thread. I’m going to try and get a version with increased debugging utilities out in the next couple days and then see what I can gather from that data…

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘[Plugin: Post Thumbnail Editor] Images Not Saving’ is closed to new replies.