Preview Image stop to work when a ImageField is added

sebas5384 - August 5, 2009 - 05:09
Project:Imagefield Crop
Version:6.x-1.0-beta3
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

First of all, sorry about my English :P

I use ImageField with ImageField Insert, and generally I use it in the "Unlimited" mode, so when I add a new ImageField Insert, happends that the Preview image of the ImageField Crop stop to work.
Doing some debugg, and I found that on the html, before the image(the preview) was an with some settings about, the thing is that when I add a new ImageField Insert loose that setting, and when you move the crop area it try to update the position of the Preview image gives me an undefined error.

Thanks :D
Again sorry about my English, ;)

AttachmentSize
imageField_bug.png206.73 KB

#1

sebas5384 - August 5, 2009 - 07:30
Title:Preview Image stop to work when a ImageField is added» I made a workarround and now it works, but hey! it works!
Status:active» patch (to be ported)

So I it's not the best solution, but it's working now :D

Now i use the "ImageField Crop for Multiple", so these it's going to be for that one, and not the last stable.
No arquivo: imagefield_crop.js

   function showPreview(c) {
-
+ // Check if someone rewrite the Drupal.settings
+ if (Drupal.settings.imagefield_crop[this.fieldName][this.delta].preview == undefined) {
+ eval($(this.wrapperId + ' .jcrop-preview-wrapper').prev().html());
+ }
+

    var rx = Drupal.settings.imagefield_crop[this.fieldName][this.delta].preview.width / c.w;
     var ry = Drupal.settings.imagefield_crop[this.fieldName][this.delta].preview.height / c.h;

If someone have some another way to resolve these problem, please let as know!

Thanxs.

#2

sebas5384 - August 5, 2009 - 17:37
Title:I made a workarround and now it works, but hey! it works!» Preview Image stop to work when a ImageField is added
Status:patch (to be ported)» needs work

#3

cels - November 4, 2009 - 10:24

This error also happens to me.

When I edit the node, the preview image shows the upper left corner of the original image.

In dev version 6.x-1.x-dev (2009-Nov-04) also happens, without the "ImageField Crop for Multiple" patchs.

What solution could there be?

 
 

Drupal is a registered trademark of Dries Buytaert.