Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8867 closed defect (fixed)

CKEditor extra plugin is not recognizable or found

Reported by: rlrj60 Owned by: itamarost
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 3 years ago.
CKEditor displays "undefined" instead of existing html text.
without_extraplugins.PNG (7.8 KB) - added by rlrj60 3 years ago.
Without "extraPlugins : tracwiki", CKEditor shows the html macro.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by rlrj60

CKEditor displays "undefined" instead of existing html text.

Changed 3 years ago by rlrj60

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

comment:1 Changed 3 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 3 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 3 years ago by itamarost

  • Resolution set to fixed
  • Status changed from new to closed

(In [10271]) fixes #8867

comment:4 Changed 3 years ago by itamarost

Thanks for the catch and the fix!

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

Add Comment

Modify Ticket

Action
as closed The owner will remain itamarost.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.