Keyword

JCE editor problems

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96829 by Jock
JCE editor problems was created by Jock
Hi,

 

I recently re-installed Joomla (so I had the latest version) and then K2 followed by JCE. But for some reason all existing items are missing the JCE editor. The extra fields have no editor and the main content area has no embedded editor.

 

When I go to create a new item the editor is there and works fine. But when I go back to edit it the editor is not there?

 

Any ideas on what is going on here and how I can fix this?

 

 

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96830 by BBC
Replied by BBC on topic JCE editor problems
Search forum. You will find a link to JCE forum.

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96831 by Jock
Replied by Jock on topic JCE editor problems
I was going to post on the JCE forum but then I realized I had to pay and subscribe to make a post.

 

Or are you talking about another JCE forum?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96832 by BBC
Replied by BBC on topic JCE editor problems
As it is some kind of bug. Don´t know where. I will post that one comment from JCE forum that is important.


 

Here is the fix I have sent to the K2 team:Open view.html.php in administrator/components/com_k2/views/items/view.html.phpReplace :

 

$js = "function initExtraFieldsEditor(){ $$('.k2ExtraFieldEditor').each(function(element) { var id = element.id; if (typeof JContentEditor != 'undefined') { if (tinyMCE.get(id)) { tinymce.EditorManager.remove(tinyMCE.get(id)); } tinyMCE.execCommand('mceAddControl', false, id); } else { new nicEditor({fullPanel: true, maxHeight: 180, iconsPath: '".JURI::root()."administrator/components/com_k2/images/system/nicEditorIcons.gif'}).panelInstance(element.getProperty('id')); } }); } function syncExtraFieldsEditor(){ $$('.k2ExtraFieldEditor').each(function(element){ editor = nicEditors.findEditor(element.getProperty('id')); if(typeof editor != 'undefined'){ editor.saveContent(); } }); } ";

 

with :

 

$js = "function initExtraFieldsEditor(){ $$('.k2ExtraFieldEditor').each(function(element) { if (typeof JContentEditor != 'undefined') { // wait until main editor is added tinyMCE.onAddEditor.add(function(mgr, ed) { // skip for extrafields editor if (ed.id == element.id) { return; } // wait until main editor is initialized ed.onInit.add(function() { tinyMCE.execCommand('mceAddEditor', false, element); }); }); } else { new nicEditor({fullPanel: true, maxHeight: 180, iconsPath: '".JURI::root()."administrator/components/com_k2/images/system/nicEditorIcons.gif'}).panelInstance(element.getProperty('id')); } }); } function syncExtraFieldsEditor(){ $$('.k2ExtraFieldEditor').each(function(element){ editor = nicEditors.findEditor(element.getProperty('id')); if(typeof editor != 'undefined'){ editor.saveContent(); } }); } ";

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96833 by Jock
Replied by Jock on topic JCE editor problems
Hi,

 

That code doesn't even exist in that file for me?

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96834 by Jock
Replied by Jock on topic JCE editor problems
OK I found out that you actually mean this file:

 

administrator/components/com_k2/views/item/view.html.php

 

Notice the path is item and not items

 

Anyway, I think we are onto something here because this file doesn't look right to me. I edited it once uploaded it with your changes and the editor loaded on the content area but only the very 1st extra field had a JCE editor and the other fields didnt.

 

When I look at this line:

 

for($i=0; $i<sizeof($extraFields); $i++){            $extraFields[$i]->element=$extraFieldModel->renderExtraField($extraFields[$i],$item->id);        }

 

Parts of it are also orange (in dreamweaver), which signifies to me that something is wrong with this file somewhere and that part is being commented out somehow?

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96835 by Jock
Replied by Jock on topic JCE editor problems
And then I uploaded it again and it is back to how it was with NO JCE editors loading.

 

Definitely something wrong with that file I feel.

 

How to troubleshoot?

 

Is there anywhere I can download older versions of JCE?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96836 by BBC
Replied by BBC on topic JCE editor problems
That code above wont work witl latest SVN. Because code doesn´t exist.

 

Try to disable force white background, black text, in JCE. And write here if it helped.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96837 by BBC
Replied by BBC on topic JCE editor problems
That "items" was just misstyping. Correct is "Item".

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96838 by BBC
Replied by BBC on topic JCE editor problems
This above is when JCE doesn´t work at all in K2. Not for extra fields.

 

I am satisfied with default K2 editor for fields. Don´t need all buttons from JCE.

Search forum, one guy had a solution for JCE and extra fields.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96839 by BBC
Replied by BBC on topic JCE editor problems
JCE makes my extra fields huge and ugly. That default editor in latest K2 is perfect for extra fields.

But, it depends what you want from extra fields. If you want some videos in fields, then JCE is needed.

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 11 months ago #96840 by Nick Texidor
Replied by Nick Texidor on topic JCE editor problems
Do you see the source code instead of the editor when you go back and edit the item?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96841 by BBC
Replied by BBC on topic JCE editor problems
Jock said:
Is there anywhere I can download older versions of JCE?

 

Here is JCE version that never made problems with K2. 1.5.77

As it is without subscription plugins, i can post it here.

 

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96842 by Jock
Replied by Jock on topic JCE editor problems
@ Nick ^ yes I see the source code in a field.

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 11 months ago #96843 by Jock
Replied by Jock on topic JCE editor problems
OK I tried with the older version of JCE and I get the same problem. The editor now appears in the main content area but only appears for the very 1st extra field ... like it is not embedded correctly as it loops through the extra fields?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #96844 by BBC
Replied by BBC on topic JCE editor problems
I can´t use K2 default nicEditor for extra fields at all. I put content in field ( doesn´t matter directly or HTML code ), click Apply or Save and nothing happens. Field is still empty.

 

JCE is 2.0  Beta7. Can´t even chose editor in field settings. "Use editor" is always empty.

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 10 months ago #96845 by Jock
Replied by Jock on topic JCE editor problems
I have a different problem now ... this is really doing my head in!

 

JCE is not being embedded when I 1st go to create an item. Once I save the item and go back in to edit it ... it is there for extra fields. Also when I save something the, the changes doesn't actually take place? If I try and insert an object I get a javascript error in IE8:

 

Message: '0' is null or not an objectLine: 1Char: 1905Code: 0URI: http://*******/plugins/editors/jce/tiny_mce/plugins/media/editor_plugin.js?version=1577&cid=37

 

Is there anyway I can download different versions of JCE to test.

 

Or does anyone have idea why I am having so many problems with JCE?

 

 

 

 

Please Log in or Create an account to join the conversation.

  • Jock
  • Jock's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 10 months ago #96846 by Jock
Replied by Jock on topic JCE editor problems
On further investigation, it is only the very 1st extra field that will not save !

 

Still they are not appearing upon when you create a new item

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum