Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Tomasz Sita

    (@tomaszsita)

    Please try v1.08 It should have more descriptive error messages.

    virilagalaus

    (@virilagalaus)

    I am having the same problem. It says it has been cropped successfully, without any error message, then it goes back to the image with no changes what so ever. Using version 1.08.

    Surykat

    (@surykat)

    Same here. Does anyone have any idea what could causing the problem? Version 1.08, WordPress 4.0.1.

    I’m having this same issue but only on my production site on WPEngine. It works fine on localhost and on the staging site on WPEngine.

    There are no error messages, it just says “The image has been cropped successfully” but the saved image hasn’t changed.

    @tomaszsita, I think this will help:

    I found the problem. It is when the admin area is SSL.

    In the cropImage() function in lib/ManualImageCrop.php:

    $uploadsDir[‘baseurl’] is changed to https via the preg_replace, but wp_get_attachment_image_src returns http, not https for the $src_file_url and $dst_file_url. So the str_replace functions on lines 165 and 171 are not working, and thus not returning file paths as expected.

    There is probably a more elegant way to do this but, I added the following lines as a temporary fix:

    On line 163:

    if (is_ssl()) {
      $src_file_url = preg_replace('#^https://#i', 'https://', $src_file_url);
    }

    On line 171:

    if (is_ssl()) {
      $dst_file_url = preg_replace('#^https://#i', 'https://', $dst_file_url);
    }

    So the new chunk of code looks like this:

    if (is_ssl()) {
      $uploadsDir['baseurl'] = preg_replace('#^https://#i', 'https://', $uploadsDir['baseurl']);
    }
    
    $src_file_url = wp_get_attachment_image_src($_POST['attachmentId'], 'full');
    
    if (!$src_file_url) {
      echo json_encode (array('status' => 'error', 'message' => 'wrong attachment' ) );
      exit;
    }
    
    if (is_ssl()) {
      $src_file_url = preg_replace('#^https://#i', 'https://', $src_file_url);
    }
    
    $src_file = str_replace($uploadsDir['baseurl'], $uploadsDir['basedir'], $src_file_url[0]);
    
    $dst_file_url = wp_get_attachment_image_src($_POST['attachmentId'], $_POST['editedSize']);
    
    if (!$dst_file_url) {
      exit;
    }
    
    if (is_ssl()) {
      $dst_file_url = preg_replace('#^https://#i', 'https://', $dst_file_url);
    }
    
    $dst_file = str_replace($uploadsDir['baseurl'], $uploadsDir['basedir'], $dst_file_url[0]);

    Thanks for figuring that out. Worked for me too.

    I tried that fix, even though im not on SSL, and im still having the same issue.

    It’s not working for me, either and I’m not using SSL (WP 4.1.2). The crop dimensions aren’t correct and the location of the crop isn’t what I selected. This makes for bad news on a photo portfolio website. Seems like this issue is unresolved for many going back some time. Hope to see it fixed soon.

    Plugin Author Tomasz Sita

    (@tomaszsita)

    Hello,

    can you please test 1.09, errors handling has been improved so hopefully we will get more info if something still won’t be working correctly.

    It didnt,t work for me. Neither v1.09 nor v1.10…

    Plugin Author Tomasz Sita

    (@tomaszsita)

    Hi guys,
    would you allow me to have a look at your set-ups?
    Please pop me an email at [email protected]

    not working anymore.
    using wp 4.2.4

    Afternoon —

    I’m experiencing the same issue with the plugin as the others mentioned. I can go through all of the steps to crop an image, and see the confirmation that the image was cropped, but have nothing change with the image itself.

    Any information on this would be greatly appreciated! This plugin could be incredibly helpful on my site.

    Just in case, my site is https://www.mistudents.org

    I’m seeing the same issue. It’s not saved

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Crops not saving?’ is closed to new replies.