List Manager Forum

CKeditor entries not showing

User moon_504 2012-05-21 07:22:49

Dear Support,

I use the CKeditor component as the default editor for my site because of its advantages.

Using listmanager, I have field of type HTML Editor. However, all items I enter in these fields do not show after saving.

I have howvever, found that they show if the default jJoomla editor is TinyMCE

How can listmanager be made to work with CKeditor so that entries will show

Thanks

Anselm

Moonsoft support 2012-05-21 12:49:58

Hello,
in order to have the editor working dynamically at front-end, it has to implement some default functions we call (regardeless of the editor chosen). Checked that when using ckeditor, function save doesn't return the value. Also when trying to insert values to edit, it returns a javascript error. This only happens when using js functions, when working on backend with this editor it works as expected, and it saves data ok.

So, we've checking the editor code. As far as we can see from this external code, we miss one function, and think some others can be called in a different way to make they work on every situation. For joomla 1.6, if we edit the file

joomla\plugins\editors\ckeditor\ckeditor.php

and modify these lines:

function onGetContent( $editor ) {
return " CKEDITOR.instances.getData(); ";
//return " CKEDITOR.instances.$editor.getData(); ";
}
function onSetContent($editor, $html) {
return " CKEDITOR.instances.setData($html); ";
//return " CKEDITOR.instances.$editor.setData($html); ";
}
function onSave($editor) {
return " $('".$editor."').set('html',CKEDITOR.instances.getData())";
}

(function onSave has beed added)

everything seems to work ok. But this is not our code, so we suggest to ask ckeditor support before modifying any plugin line, because we don't know if any change could have unwanted side-effects.

In case it can be of help, the functions we need to call from the editor, are the ones built with these expressions:

$editor1->save('fld_out');

and $editor1->setContent(editor,value);


$editor1->display(... is working ok on both ends.


Hope this helps, best regards

User moon_504 2012-05-21 14:43:16

Thanks for the reply Support,

unfortunately my site is built with joomla 1.5 and the ckeditor.php is not in the location you have specified.

Could you kindly send me steps that work for joomla 1.5

Thanks

Anselm

Moonsoft support 2012-05-22 13:35:49

Hello,
version 1.5 of ckeditor contains same file, but located one folder above:

joomla\plugins\editors\ckeditor.php


without further testing, it seems is the same code that we found on v1.6, so the patch should be valid also here. Again, we suggest to contact that component support to confirm this changes won't cause any harm to the rest of it's functions.

Hope this helps, best regards
Moonsoft Team

User moon_504 2012-05-22 14:26:32

Dear Support,

I have tried this and it id not working.

I also did not understand you when you said.

------
In case it can be of help, the functions we need to call from the editor, are the ones built with these expressions:

$editor1->save('fld_out');

and $editor1->setContent(editor,value);


$editor1->display(... is working ok on both ends
-----------------

Could you provide clear instructions of what I should do

Thanks

Moonsoft support 2012-05-22 14:40:17

Hello,
tested here, and with these changes suggested, we get the ckeditor working (save&edit) at the front-end on joomla1.5. Please double-check you've modified the 3 functions, and the file was correctly overwritten.
The other functions we comment, are the ones we call from listmanager extension, coded at each editor, they are the standard ones, so they usually work regardeless of the editor chosen. We mention them in case you can contact your editor support, to ask for solution, because the two functions we call don't return as expected, and so the values are lost.
Maybe they can guide you to another easier solution to have the editor working, because changing third-party code is always a risky business.

Best regards
Moonsoft Team

User moon_504 2012-05-22 22:26:13

Dear Support,

I have cross checked and have modified all three functions. Unfortunately when I make the change it shows some kind or error where all items dont display but the Add Items form only is shown when I access list manager and also all the buttons of the add items dont work

I tried playing around with the save function you sent by add $ to the html and The items showed normally, I could add a item but still it was not displaying.

Save function as sent by you
---------
}
function onSave($editor) {
return " $('".$editor."').get('html',CKEDITOR.instances.getData())";
}

As modified
}
function onSave($editor) {
return " $('".$editor."').get('$html',CKEDITOR.instances.getData())";
}

Could you kindly resend me the changes I need to make. I have tried this with different templates and all yield the same results.

Thanks

Anselm

Moonsoft support 2012-05-23 18:16:39

Hello,
we have uploaded the modified file here:

http://www.moonsoft.es/images/stories/components/listmanager/ckeditor.zip

it contains the ckeditor.php file that we have working here.

But we don't even know if you may have another version of the editor, so we strongly suggest to contact this extension support in order to make changes to their code if you can't get it working with this file.

Regards

User moon_504 2012-05-25 21:30:43

Dear Support,

I followed the instructions and it worked for listmanager. Unfortunately with the changes the ckeditor does not save and all the buttons become inactive when used in the front end to for example submit an article. I will be glad if you could offer further assistance on this as so far I use ckeditor because it allows for file upload and server browsing from the front end while creating articles

Thanks

Anselm

Moonsoft support 2012-05-27 10:29:45

Hello,
we'd like to be of more help here, but we'd like you to understand we've gone far beyond the usual limits trying to fix a third party code.We are able to change the code to make it work with LM, but we warned you that it had the risk to make another part of the extension fail. As the fist half of the problem is solved, we suggest to contact your editor support, let them know about the patch we sent you, because they will know how to make it work without interfering with the other parts of their code so you could have the editor working as usual for your articles, and used as html editor inside your lists.

Best regards

...
List Manager

Build different lists for your site

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!