Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8867 closed defect (fixed)

CKEditor extra plugin is not recognizable or found

Reported by: rlrj60 Owned by: Itamar Ostricher
Priority: normal Component: CkEditorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I installed the plugin to my Trac 0.12.2, created a sample wiki page with a few lines, then saved it. When open the page again, I got "Undefined" within the CKEditor window as shown in the first attachment. I did some tracing and tried to remove the "extraPlugin : tracwiki", the original wiki page now shows up with encapsulated html macro (see second attachment).

It appears the CKEditor is not able to find the "tracwiki" extra-plugin. Any suggestion how to debug is greatly appreciated.

Attachments (2)

undefined.PNG (7.2 KB) - added by rlrj60 6 years ago.
CKEditor displays "undefined" instead of existing html text.
without_extraplugins.PNG (7.8 KB) - added by rlrj60 6 years ago.
Without "extraPlugins : tracwiki", CKEditor shows the html macro.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by rlrj60

Attachment: undefined.PNG added

CKEditor displays "undefined" instead of existing html text.

Changed 6 years ago by rlrj60

Attachment: without_extraplugins.PNG added

Without "extraPlugins : tracwiki", CKEditor shows the html macro.

comment:1 Changed 6 years ago by anonymous

I traced the code to the function jQuery.ajax() which returns "undefined". "ajax_data" does contain the HTML text before calling the AJAX function. Is the function expecting raw wiki text?

46   var ajaxResponse = jQuery.ajax({
47       type: "POST", url: ck_render_url,
48       data: ajax_data, dataType: "html", async: false
49       //success: this.ajaxSuccess, error: this.ajaxError
50   });
51   // @todo: Error handling for AJAX request
52   data = ajaxResponse.response;

comment:2 Changed 6 years ago by rlrj60

Turned out ajaxResponse.response is undefined. ajaxResponse.responseText contains correct data. Not sure whether it's a part of Trac 0.12.2 or not. response on line #52 above should be appended with "Text":

52   data = ajaxResponse.responseText;

comment:3 Changed 6 years ago by Itamar Ostricher

Resolution: fixed
Status: newclosed

(In [10271]) fixes #8867

comment:4 Changed 6 years ago by Itamar Ostricher

Thanks for the catch and the fix!

I wonder why it worked as it was. Maybe some compatibility thing in jQuery.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Itamar Ostricher.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.