• Pretty self-explanatory; I can adjust the image, but can’t save it for one reason or other. No problems with saving uploaded/other plugin created images, so what’s the deal?
    I’m using WordPress 3.5.2 and the current version of this plugin, I have been trying with several different themes and it hasn’t worked with any of them.

    https://www.ads-software.com/plugins/crop-thumbnails/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Hi, did you read the 4. entry in the FAQ?

    greetings Volkmar

    Thread Starter Empuska

    (@empuska)

    Yep, I tried that too. I tried with different browsers too to make sure it wasn’t about cache files.

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    OK, a few questions:

    • Did you normally upload the images? (via fileupload in posts / mediathek)
    • Did all image-sizes are correctly generated after upload?
    • Did you get any messages/erros when clicking on “save crop”? What did the plugin do after clicking

    If there is no response after clicking it may be a javascipt issue. Open the Javascript-Console (in Google-Chrome, hit F12 and click on Console.), did you see any errors?

    Greetings Volkmar

    Thread Starter Empuska

    (@empuska)

    Yes, I have normally uploaded the image via WordPress’ flie uploader, all the sizes are generated and there is no errors or messages after I press “Save Crop”.

    After pressing “Save Crop”, the plugin appears working on something, but instead of showing a cropped image anywhere in the context (in the Crop Featured Image-plugin popup, in the post it panel, or in the actual page), it shows the standard thumbnail that was generated during the upload.

    JavaScript shows this sort of an error:

    Save Function Debug submitted image-data
    stdClass Object
    (
        [name] => thumbnail
        [width] => 180
        [height] => 120
        [ratio] => 1.5
        [crop] => 1
    )
    
    filename:/var/www/vhosts/e******nikov.net/httpdocs/wp-content/uploads/7c827_0fd513fa161a2f64204526f435907860993831a3_m-180x120.jpg
    error on 7c827_0fd513fa161a2f64204526f435907860993831a3_m-180x120.jpg cpt-crop.js?ver=0.8.2:94
    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Hi,
    sorry for the long response times – i have a fulltime job.
    If you still with me – we may dig a little bit deeper.

    1. got to settings > crop-thumbnails and activate the to debug-checkboxes
    2. try to crop an image, while had the javascript-console open
    3. copy the text that appears after you had clicked on “Save Crop”
    Thread Starter Empuska

    (@empuska)

    No problem!

    It’s the same text I already posted.

    Save Function Debug submitted image-data
    stdClass Object
    (
        [name] => thumbnail
        [width] => 180
        [height] => 120
        [ratio] => 1.5
        [crop] => 1
    )
    
    filename:/var/www/vhosts/e******nikov.net/httpdocs/wp-content/uploads/7c827_0fd513fa161a2f64204526f435907860993831a3_m-180x120.jpg
    error on 7c827_0fd513fa161a2f64204526f435907860993831a3_m-180x120.jpg

    And here’s the debugger’s text;

    ---options---
    Array
    (
      [hide_size] => Array
        (
          [post] => Array
            (
              [post-thumbnail] => 1
            )
    
          [page] => Array
            (
              [post-thumbnail] => 1
            )
    
        )
    
      [debug_js] => 1
      [debug_data] => 1
    )
    
    ---all_image_sizes---
    Array
    (
      [thumbnail] => Array
        (
          [width] => 180
          [height] => 120
          [crop] => 1
        )
    
      [medium] => Array
        (
          [width] => 300
          [height] => 300
          [crop] =>
        )
    
      [large] => Array
        (
          [width] => 1024
          [height] => 1024
          [crop] =>
        )
    
      [post-thumbnail] => Array
        (
          [width] => 214
          [height] => 120
          [crop] => 1
        )
    
    )
    
    ---img-postmeta---
    Array
    (
      [width] => 459
      [height] => 480
      [file] => 7c827_0fd513fa161a2f64204526f435907860993831a3_m.jpg
      [sizes] => Array
        (
          [thumbnail] => Array
            (
              [file] => 7c827_0fd513fa161a2f64204526f435907860993831a3_m-180x120.jpg
              [width] => 180
              [height] => 120
              [mime-type] => image/jpeg
            )
    
          [medium] => Array
            (
              [file] => 7c827_0fd513fa161a2f64204526f435907860993831a3_m-286x300.jpg
              [width] => 286
              [height] => 300
              [mime-type] => image/jpeg
            )
    
          [post-thumbnail] => Array
            (
              [file] => 7c827_0fd513fa161a2f64204526f435907860993831a3_m-214x120.jpg
              [width] => 214
              [height] => 120
              [mime-type] => image/jpeg
            )
    
        )
    
      [image_meta] => Array
        (
          [aperture] => 0
          [credit] =>
          [camera] =>
          [caption] =>
          [created_timestamp] => 0
          [copyright] =>
          [focal_length] => 0
          [iso] => 0
          [shutter_speed] => 0
          [title] =>
        )
    
    )

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Hi Empuska,
    sorry but it seems we don’t get any further. I may find the reason behind that problem, but not if i cant reproduce the error directly (by accessing your server). If you are a programmer or know someone how has good knowledge in PHP you may do this by your own.

    I can only assume that the Reason behind the problem is that some server configuration prevent the script from saving the image (maybe the script has no permission to save on the default location – did you use some special location for upload files?). The exact location of the code that causes the error should be in crop-thumbnails/functions/save.php between line 103 and 119.

    The last thing you may do for your own, you may enhance your debug output. To do so add the following code after line 132 (of crop-thumbnails/functions/save.php) from

    $this->addDebug('error on '.$_filepath_info['basename']);

    to

    $this->addDebug('error on '.$_filepath_info['basename']);
    $this->addDebug(implode(' | ',$_processing_error));

    Don’t know why i don’t add this already in the last release ??

    This should give more information on into the javascript console after clicking on “Save Crop”.

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Any progress on your problem. Did you find a solution?

    hi there, i have similar problem on my clients hosting.
    after adding that extra line you mentioned im getting:
    Save Function Debug submitted image-data
    stdClass Object
    (
    [name] => thumbnail
    [width] => 150
    [height] => 150
    [ratio] => 1
    [crop] => 1
    )

    filename:/var/www/www.zagrodowy.pl/WWW/wp-content/uploads/2013/05/jako??-roku1-150×150.jpg
    error on jako??-roku1-150×150.jpg
    Cant generate filesize “thumbnail”.

    image was uploaded via wp and all the image initaial thumbnails generated fine.

    Hi Volkmar,
    Please add this number_format condition in functions/editor.php on line 294 in order to avoid a bug that might occur on systems that have comma as a decimal separator (as I have, and the cropping functionality breaks)
    I hope you understand what I mean.

    Original:
    [...] "ratio":<?php echo $ratio; ?>, [...]
    Modified:
    [...] "ratio":<?php echo number_format($ratio, 2, '.', ''); ?>, [...]

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    @krzysztof_hellostudio
    Hi,
    i tested a file with this filename on my local testsystem and can’t get even the wordpress generated filesizes – so i assume my plugin will also had problemes with special characters.
    Are you able to crop files with only latin-character filenames?

    @costyd
    Thanks a lot!

    • Is this the only position you got problems with the number format?
    • Do you know how i can test this in a apache/php enviroment (what settings has to be changed)?

    Don’t know when i get the time to make the next update.

    Hello, Volkmar! Thanks for such a useful plug-in!

    Could you please fix the bug: if an image has a UTF-8 filename (like “картинка.jpg”), the plug-in won’t save a cropped thumbnail. The preview of a cropped thumbnail is a broken-link (absent) image, and when I hit save it says “There was a problem saving the crop…”

    Thanks and good luck!

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Hi Mike,
    i would help you BUT, i had two testsystems: One runs localy and the second is a on Standard-Hosting. On both systems i can even upload images with utf-8 filenames.

    If you can name me a server- or php-setting that would allow me to upload the files i would try to fix the bug in my plugin.

    Ciao Volkmar

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Doesn't save the cropped image anywhere’ is closed to new replies.