I want to edit crop, after it saves, the first crop continues in the content view, I can not edit. After edit, crop marking is on the new place in content edit, but when viewing the content remains the first crop. Already cleared all caches, changed browser, machine and nothing changed.

the example of drupal 6 on: (http://www.aswissidea.com/) you can edit the content and can move the crop of place, I click save and shows a good. but the example of drupal 7 on: (http://www.aswissidea.org/) I can not edit content for testing whether you are bug, the user demo does not have permission to edit content.

CommentFileSizeAuthor
#9 epsacrop-1751692.patch501 bytesantoniogr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MathieuMa’s picture

We are checking the same issue - when updating a crop with a preset of the same size, the previous picture is not replaced by the new one.
This is due to the core handling of imagecache : if the image is there, with the proper name (which includes the presset name) - processing is not done again.
Modifying an existing croped picture should trigger a deletion of the cached image (so it's regenerated next time the preset is called)
I'll post what I find once I have a solution.

Elijah Lynn’s picture

Same here. In addition, I am also getting the error - Notice: Undefined index: epsacrop-5-4 in epsacrop_crop_image()

I am on 7.x-2.2, however I wonder if this is fixed in latest dev.

Elijah Lynn’s picture

Tested latest dev and not getting error anymore but still same issue, only crops on first upload.

Elijah Lynn’s picture

Assigned: ggcampos » Unassigned
Elijah Lynn’s picture

Cross linking relevant D7 issue - "Not saving crop" - http://drupal.org/node/1664216

Elijah Lynn’s picture

Cross linking relevant D6 issue - "Save button does nothing I can see" - http://drupal.org/node/1328744

Elijah Lynn’s picture

I went ahead and cloned the site then started disabling modules. It came down to a Pantheon API module I had enabled on my local environment. However, when the site is live on Pantheon servers and the module is enabled, it works more than half the time, sometimes it puts an image up sometimes it doesn't and sometimes it takes a minute for the image to be generated.

Anyways, I don't know what is conflicting as I am not that savvy (yet) but it seems like another module is fighting the epsacrop module or imagestyles.

Update: sure enough, the Pantheon Platform API module has the below code which probably has nothing to do with epsa crop and all todo with image styles:

function pantheon_api_image_path_flush($path) {
  pantheon_api_load_api();
  $styles = image_styles();
  $paths = array();
  foreach($styles as $style) {
    $image_path = image_style_path($style['name'], $path);
    if (strpos($image_path, 'public://') === 0) {
      $paths[] = str_replace('public://', '/', $image_path);
    }
  }
  if (count($paths) > 0) {
    pantheon_api_bulk_file_delete($paths);
  }
}
Elijah Lynn’s picture

After messing around with it more I decided to go with the latest dev of Manual Crop. It is pretty nice and works well. http://drupal.org/project/manual-crop

antoniogr’s picture

Version: 7.x-2.2 » 7.x-2.4
Issue summary: View changes
FileSize
501 bytes

I have the same problem, It works when I delete the cached images.

I find the problem for me is in the function _epsacrop_get_style_name_from_url() when it's return FALSE don't update the new crop styles and set centered.

I updated this function to return the first epsa styles defined.

Now it's working fine for me.

/**
 * Helper function that get the style name from image url.
 *
 * @access private
 * @return void
 */
function _epsacrop_get_style_name_from_url() {
  $split = explode('/', $_GET['q']);
  $pointer = array_search('styles', $split);
  if ($pointer !== FALSE) {
    return $split[++$pointer];
  }
  $item = _epsacrop_load_styles();
  $item = array_values($item)[0];

  return $item['name'];
}

I attach a patch, maybe could be useful for someone.

CB’s picture

Status: Active » Needs review