Page 2 of 2

Re: Image add problem in second language

Posted: Wed Apr 21, 2010 5:32 am
by Qphoria
right but it could be the image manager not able to find multiple instances

Re: Image add problem in second language

Posted: Wed Apr 21, 2010 2:20 pm
by i2Paq
Qphoria wrote:right but it could be the image manager not able to find multiple instances
If you mean by Image Manager the Image Properties screen that pop-ups when clicking the image in the ckEditor then yes I think it is.
It does not recognize the correct path of the image you want to add.

Re: Image add problem in second language

Posted: Wed Apr 21, 2010 5:10 pm
by Blueforce
Hi guys,

I think the problem is /admin/controller/common/filemanager.php.

If I instead use CKFinder as file manager everything works as it should, and I can upload and add images in all languages. CKFinder is also a "standalone" or "external" filemanager as the one included in OC, and CKFfinder passes the image path to CKEditors image URL field correctly. I don't know if this info can help you in any way but I thought I let you know anyway.

Regards,
Leffe

Re: Image add problem in second language

Posted: Fri Apr 23, 2010 4:38 am
by Blueforce
Hi there,

Any news about this issue(bug)?

Regards,
Leffe

Re: Image add problem in second language

Posted: Fri May 14, 2010 11:00 am
by NobleKnight
I'm having the EXACTLY SAME problem.
Was there any conclusions?!?

[1.4.7]Add images inside of CKEditor in second language

Posted: Sun May 16, 2010 6:43 am
by NobleKnight
This one was discussed at:
http://forum.opencart.com/viewtopic.php?f=20&t=13622" onclick="window.open(this.href);return false;

Qphoria manage to find it's javascript error:
Error: this.getInputElement() is null
Source File: /admin/view/javascript/ckeditor/ckeditor.js
Line: 97

But... no conclusion so far.

Re: [1.4.7]Add images inside of CKEditor in second language

Posted: Sun May 16, 2010 10:35 pm
by i2Paq
NobleKnight wrote:This one was discussed at:
http://forum.opencart.com/viewtopic.php?f=20&t=13622" onclick="window.open(this.href);return false;

But... no conclusion so far.
So why not continue there?

CKEditor Image add problem in 2nd editor

Posted: Fri May 28, 2010 9:23 pm
by squeaky
I am having a similar issue. I added the ability to have a splash page on my carts. In the admin on the product form, I added a tab for the splash, and then added a textarea to manage the splash page content. This is then replaced with a ckeditor screen.

The editor works as far as saving text content, however when I try to upload images it fails.

Here is the error message I see in Firefox/Firebug

z._.filebrowserSe is undefined
http://obc1.developer.com/admin/view/ja ... keditor.js
Line 42

I assume it is because I have two editors on the product_form template.
If I remove one the single one will work, it is when I add a 2nd one that I get the error message.

I assume this is the case with multiple languages, there are two editors present on the product_form template.

Any solutions for this?

Thanks for your time

Re: CKEditor Image add problem in second language

Posted: Wed Jul 21, 2010 2:01 pm
by vinaecom
Hi guys,

I have a similar problem. Over time debugging, I have found Solution for this. Hope, I can help you :

Open file:
Upload\admin\controller\common\filemanager.php

Find line 42:

Code: Select all

if (isset($this->request->get['CKEditorFuncNum'])) {
            $this->data['fckeditor'] = TRUE;
        } else {
            $this->data['fckeditor'] = FALSE;
        } 
Replace:

Code: Select all

if (isset($this->request->get['CKEditorFuncNum'])) {
            $this->data['fckeditor_function'] = $this->request->get['CKEditorFuncNum'] ;
            $this->data['fckeditor'] = TRUE;
        } else {
            $this->data['fckeditor_function'] = 0;
            $this->data['fckeditor'] = FALSE;
        } 

After open file:
Upload\admin\view\template\common\filemanager.tpl

Find line 201:

Code: Select all

window.opener.CKEDITOR.tools.callFunction(1, '<?php echo $directory; ?>' + $(this).attr('file'));
Replace:

Code: Select all

window.opener.CKEDITOR.tools.callFunction(<?php echo $fckeditor_function; ?>, '<?php echo $directory; ?>' + $(this).attr('file'));

Regards,
VinaEcom

Re: CKEditor Image add problem in second language

Posted: Fri Oct 29, 2010 6:15 pm
by zicka
Thanx! It works great!

Re: CKEditor Image add problem in second language

Posted: Wed Nov 24, 2010 12:21 pm
by clinton4
This did not work for me. When i click the image that i want to use, i only get the image name (example: blabla.jpg) in the URL field. Any idea how to fix this?

Edit:

Code: Select all

window.opener.CKEDITOR.tools.callFunction('<?php echo $fckeditor_function; ?>', '<?php echo $directory; ?>/image/data/' + $(this).attr('file'));
Worked for me.

Re: CKEditor Image add problem in second language

Posted: Sun Mar 06, 2011 10:48 pm
by ratnalaurentina
vinaecom wrote:Hi guys,

I have a similar problem. Over time debugging, I have found Solution for this. Hope, I can help you :

Open file:
Upload\admin\controller\common\filemanager.php

Find line 42:

Code: Select all

if (isset($this->request->get['CKEditorFuncNum'])) {
            $this->data['fckeditor'] = TRUE;
        } else {
            $this->data['fckeditor'] = FALSE;
        } 
Replace:

Code: Select all

if (isset($this->request->get['CKEditorFuncNum'])) {
            $this->data['fckeditor_function'] = $this->request->get['CKEditorFuncNum'] ;
            $this->data['fckeditor'] = TRUE;
        } else {
            $this->data['fckeditor_function'] = 0;
            $this->data['fckeditor'] = FALSE;
        } 

After open file:
Upload\admin\view\template\common\filemanager.tpl

Find line 201:

Code: Select all

window.opener.CKEDITOR.tools.callFunction(1, '<?php echo $directory; ?>' + $(this).attr('file'));
Replace:

Code: Select all

window.opener.CKEDITOR.tools.callFunction(<?php echo $fckeditor_function; ?>, '<?php echo $directory; ?>' + $(this).attr('file'));

Regards,
VinaEcom
I am having a problem like this:
Image

And the patch by vinaecom doesn't solve this issue. Anybody can help please? :(

Re: CKEditor Image add problem in second language

Posted: Mon Mar 07, 2011 5:22 am
by i2Paq
ratnalaurentina wrote:And the patch by vinaecom doesn't solve this issue. Anybody can help please? :(
IT IS A BUG!

Re: CKEditor Image add problem in second language

Posted: Mon Mar 07, 2011 5:33 am
by clinton4
Iam using 1.4.9.3 and i had the same problem. My solution was to change the owner and group rights to apache on the whole image folder, subfolders and files.

Re: CKEditor Image add problem in second language

Posted: Mon Mar 07, 2011 9:23 am
by ratnalaurentina
clinton4 wrote:Iam using 1.4.9.3 and i had the same problem. My solution was to change the owner and group rights to apache on the whole image folder, subfolders and files.

hi, could you explain the steps to change the owner and group rights of images folder to apache please? sorry for the noob question. kindly reply please. Best regards.

P.S: I've also tested even if i do clean install and the site is only one language (english), the problem still exists in the ckeditor image. even if you tried in the opencart demo http://demo.opencart.com/admin to upload image using ckeditor, the same problem exists. :(

Re: CKEditor Image add problem in second language

Posted: Mon Mar 07, 2011 2:11 pm
by i2Paq
ratnalaurentina wrote: the same problem exists. :(
IT IS A BUG!

Re: CKEditor Image add problem in second language

Posted: Sun Apr 17, 2011 6:44 am
by tuba
thank you vinaecom worked great!

Re: CKEditor Image add problem in second language

Posted: Fri May 27, 2011 7:43 am
by AndyGaskell
Hi Everyone

I tried vinaecom's fix from Wed Jul 21, 2010 6:01 am, and clinton4's addendum from Wed Nov 24, 2010 4:21 am, and still have this issue. I also checked the permissions and that seemed ok. That said, it's been a long day, so I'll check this all tomorrow.

I'd say there seems to be a bug with uploading images via the "Upload" tab in the "Image Properties" dialogue, which I think is what I've hit here. Pretty much as-per the chat above.

There is a work around though, using the following steps...
1: Click the little button with the house, as my client calls the CKed image button.
2: Click the "Browse Server" button the "Image Properties" dialogue.
3: Click the "Upload" button in the "Image manager".
4: Select your image in the "File Upload" dialogue that appears, it'll then upload your image.
5: Now your image will be shown in the "Image manager", you can just double-click it to insert it into the page.

I'm on version 1.4.9.1 on an Ubuntu 10.04 LTS Xen VM hosted on Linode.

Re: CKEditor Image add problem in second language

Posted: Fri Oct 21, 2011 5:52 pm
by webpie it.
vinaecom wrote:Hi guys,

I have a similar problem. Over time debugging, I have found Solution for this. Hope, I can help you :

Open file:
Upload\admin\controller\common\filemanager.php

Find line 42:

Code: Select all

if (isset($this->request->get['CKEditorFuncNum'])) {
            $this->data['fckeditor'] = TRUE;
        } else {
            $this->data['fckeditor'] = FALSE;
        } 
Replace:

Code: Select all

if (isset($this->request->get['CKEditorFuncNum'])) {
            $this->data['fckeditor_function'] = $this->request->get['CKEditorFuncNum'] ;
            $this->data['fckeditor'] = TRUE;
        } else {
            $this->data['fckeditor_function'] = 0;
            $this->data['fckeditor'] = FALSE;
        } 

After open file:
Upload\admin\view\template\common\filemanager.tpl

Find line 201:

Code: Select all

window.opener.CKEDITOR.tools.callFunction(1, '<?php echo $directory; ?>' + $(this).attr('file'));
Replace:

Code: Select all

window.opener.CKEDITOR.tools.callFunction(<?php echo $fckeditor_function; ?>, '<?php echo $directory; ?>' + $(this).attr('file'));

Regards,
VinaEcom
This worked perfectly!!!

1.4.9.3!!!

Great work!!!

Re: [1.4.7] CKEditor Image add problem in second language

Posted: Thu May 17, 2012 1:34 pm
by ruslyrossi
@vinaecom my hero, thanks .