Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#13273 closed Bug (invalid)

Inline Save BUG (with FIX )

Reported by: Andrea Rocca Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.7
Keywords: Cc:

Description

Steps to reproduce: When customize plugin with builder, add "inline save", the "ckeditor.js" does not include one parameter (editorID) in the POST.

CODE WITH BUG:

CKEDITOR.plugins.add("inlinesave",{init:function(a){a.addCommand("inlinesave",{exec:function(a){(function(){var b=a.getData();jQuery.ajax({type:"POST",url:dump_file,data:{editabledata:b}}).done(function(a,b,c){alert("Your content was successfully saved. +c.responseText+?")}).fail(function(a){alert("Error saving content. +a.responseText+?")})})()}});a.ui.addButton("Inlinesave",{label:"Save",command:"inlinesave",icon:this.path+"images/inlinesave.png"})}});

CODE BUG FIXED (adding "c" var), with this code:

CKEDITOR.plugins.add("inlinesave",{init:function(a){a.addCommand("inlinesave",{exec:function(a){(function(){var b=a.getData();var c=a.container.getId();jQuery.ajax({type:"POST",url:dump_file,data:{editabledata:b, editorID:c }}).done(function(a,b,c){alert("Your content was successfully saved. +c.responseText+?")}).fail(function(a){alert("Error saving content. +a.responseText+?")})})()}});a.ui.addButton("Inlinesave",{label:"Save",command:"inlinesave",icon:this.path+"images/inlinesave.png"})}});

Attachments (1)

build-config.js (2.4 KB) - added by Andrea Rocca 3 years ago.
buildconfig

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by Andrea Rocca

Attachment: build-config.js added

buildconfig

comment:1 Changed 3 years ago by Piotrek Koszuliński

Resolution: invalid
Status: newclosed

Inlinesave is a 3rd party plugin so you need to report this issue to its author.

comment:2 Changed 3 years ago by Andrea Rocca

Yes but the error is when I customize plugin with CKEDITOR builder!

comment:3 Changed 3 years ago by Jakub Ś

The code in inline save plugin is:

var data = editor.getData();
var dataID = editor.container.getId();

It looks correct so it is strange why builder ignores/removes this line. Is it because of container word or perhaps builder treats both variables as the same (var data and var dataID are very similar and for loose regex they might look the same).

comment:4 Changed 3 years ago by Piotrek Koszuliński

The code in inline save plugin is:

var data = editor.getData();
var dataID = editor.container.getId();

I don't see anything like this in the inlinesave plugin (https://github.com/tyleryasaka/inlinesave/blob/master/inlinesave.zip). There's only the data variable.

comment:5 Changed 3 years ago by Jakub Ś

Keywords: inline inlinesave removed

The version I'm talking about is available in our add-ons repository - http://ckeditor.com/addon/inlinesave.

What is more it is newer version than the one that is currently in github you have pointed out. Github contains version 1.21 (10th march) while add-ons contain 1.3 (14th April).


Now the fun part - when you look at the numbering, version 21 looks newer than version 3 so as the result CKBuilder was using older version 1.21. We have changed it manually to 1.30 and now correct version is being taken for the build.

Anyway issue is still invalid. Plugins author has made a mistake as he should set either previous version to 1.2.1 or newer one to 1.30.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy