Hi!

I have an issue, which i'm still trying to face. Maybe someone know anything what will be helpfull.

Scenario:
1. Add content > Add image via ckeditor toolbar > open Dialog box > open IMCE dialog
2. Upload an image via IMCE (lets say it has 600x600)
3. Resize this image (without "create new option" checked) (lets say to 500x500)
4. Send to ckeditor option > we're back ckeditor to dialog box
5. ckeditor's dialog box shows an old (bigger) image with width set to 600 and height set to 600

i thought that it is an IMCE issue, but i was testing it with Fckeditor and it works fine.
BTW on FF it seems to work fine too.

tested on:
IMCE 6.x-2.1
Ckeditor 6.x-1.2
Ckeditor 3.5.2
not working on ie8

IMCE 6.x-2.1
Fckeditor 6.x-2.1
fckeditor 2.6.6
working on ie8

btw tested on:
ckeditor 3.4 - not working
ckeditor 6.x-1.x-dev - not working

Please help (i'm trying to find the cause still..)

CommentFileSizeAuthor
#2 file_insert.jpg81.27 KBNaiya
#2 cookied.JPG21.58 KBNaiya
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Naiya’s picture

I made another test - maybe it will help you:

1. set a plugin IMCE in order to open IMCE directly from ckeditor
2. add content > add image (with imce plugin) > upload image (1200x800)
3. resized that image (now it is 900x600) and insert this image to my body
4. it was insterted ok (900x600)
5. go to properties of inserted image > browse > resize this image one more time (100x67) > insert file option clicked - and we're back to ckeditor dialog box with... 1200x800!

blah.. even if i upload and resize image - close everything and than open everything and add this image - in ckeditor dialog box it still shows old values and old image (while in all/default/files i only have my new - much smaller image..)

EDIT: on http://ckeditor.com/demo (with ckfinder, without drupal it works fine..)

EDIT: i have found out that in ckeditor.utils.js:

/**
 * IMCE support
 */
function ckeditor_fileUrl(file, win){
  var cfunc = win.location.href.split('&');

  for (var x in cfunc) {
    if (cfunc[x].match(/^CKEditorFuncNum=\d+$/)) {
      cfunc = cfunc[x].split('=');
      break;
    }
  }
alert(file.width); //here is the correct value
  CKEDITOR.tools.callFunction(cfunc[1], file.url);
  win.close();
}

there is correct value.
try to go further..

Naiya’s picture

Title: Ckeditor dialog box - wrong image and size after resize in IMCE browser (IE8) » Ckeditor dialog box - wrong image and size after resize in IMCE browser
Priority: Normal » Major
FileSize
21.58 KB
81.27 KB

I have more info.

I attached result.
bad news: on FF resize does not working too if ie resize was performed.
good news: when resize on FF does not work - we can "fix it" by deleting cookie
bad news: i didn't manage to do similar cookie "fix"

i can run more tests but I don't have any more idea what could be a problem.

ah, another thing - i logon to my page and enter edit page (i have two cookies)
i click "browse" and exit dialog box (cookies are doubled.. is it correct?)
screen attached. ("ciasteczka" = "cookies")

BTW - i changed priority to major as it breaks resize/crop functionality.

Naiya’s picture

Version: 6.x-1.2 » 6.x-1.3

I have tested it on 6.x-1.3 (just in case) but the bug is still there..

dczepierga’s picture

@Naiya, thx for all this tests - really good work.

I reproduce this bug and I will try to fix it asap, so please be patient.

For now i can recommend you to use CKFinder instead, because problem is not so easy and will be really hard to fix...

Greetings

Naiya’s picture

Great! Please don't hesitate to ask for test - i will do what i can to help You with it.

dczepierga’s picture

Status: Active » Needs work

Ok :) Really thx for help...

For now i mark is as needs work.

Greetings

Naiya’s picture

Hello,

how it is going? I know that it is not so easy. Can I help somehow? :)

dczepierga’s picture

Hi,

For now we cannot find any solution to fix it... it's really not so easy, so u must be realy patient...

Greetings