내가 CK 편집기 (https://github.com/galetahub/ckeditor)의 루비 보석을 사용하고 재산 'langEntries'을 읽을 수 없습니다 나는이 오류 받고 있어요 :CKEditor 4 : catch되지 않은 형식 오류가 : 널 (null)
여기Uncaught TypeError: Cannot read property 'langEntries' of null
그것에서 발생하는 것 있어요 코드 :
CKEDITOR.plugins.load = CKEDITOR.tools.override(CKEDITOR.plugins.load, function (a) {
var d = {};
return function (b, c, e) {
var i = {},
g = function (b) {
a.call(this, b, function (a) {
CKEDITOR.tools.extend(i, a);
var b = [],
l;
for (l in a) {
var s = a[l],
q = s && s.requires;
if (!d[l]) {
if (s.icons)
for (var u = s.icons.split(","), f = u.length; f--;) CKEDITOR.skin.addIcon(u[f], s.path + "icons/" + (CKEDITOR.env.hidpi && s.hidpi ? "hidpi/" : "") + u[f] + ".png");
d[l] = 1
}
if (q) {
q.split && (q = q.split(","));
for (s = 0; s < q.length; s++) i[q[s]] || b.push(q[s])
}
}
if (b.length) g.call(this,
b);
else { *ERRORING HERE*
for (l in i) {
s = i[l];
if (s.onLoad && !s.onLoad._called) {
s.onLoad() === false && delete i[l];
s.onLoad._called = 1
}
}
c && c.call(e || window, i)
}
}, this)
};
g.call(this, b)
}
});
CKEDITOR.plugins.setLang = function (a, d, b) {
var c = this.get(a),
a = c.langEntries || (c.langEntries = {}),
c = c.lang || (c.lang = []);
c.split && (c = c.split(","));
CKEDITOR.tools.indexOf(c, d) == -1 && c.push(d);
a[d] = b
};
CKEDITOR.ui = function (a) {
if (a.ui) return a.ui;
this.items = {};
this.instances = {};
this.editor = a;
this._ = {
handlers: {}
};
return this
};
나는이 Simple Uploads 플러그인을 사용하려고하는데, 모든 언어가 있습니다. 내 디렉토리 구조는 다음과 같다 : 여기
이 오류에 대한 CK 편집기에 대한 문서입니다 : 내 플러그인의 언어 파일의 모든 올바른 형식
http://docs.ckeditor.com/#!/api/CKEDITOR.plugins-method-setLang
, 그래서 문제가 무엇인지 찾기 위해 고군분투 .
이 될 것 해결에 어떤 도움을 크게 감사
편집 : 여기에 영어 랭 파일입니다 -
CKEDITOR.plugins.setLang('simpleuploads', 'en',
{
// Tooltip for the "add file" toolbar button
addFile : 'Add a file',
// Tooltip for the "add image" toolbar button
addImage: 'Add an image',
// Shown after the data has been sent to the server and we're waiting for the response
processing: 'Processing...',
// File size is over config.simpleuploads_maxFileSize OR the server returns HTTP status 413
fileTooBig : 'The file is too big, please use a smaller one.',
// The extension matches one of the blacklisted ones in config.simpleuploads_invalidExtensions
invalidExtension : 'Invalid file type, please use only valid files.',
// The extension isn't included in config.simpleuploads_acceptedExtensions
nonAcceptedExtension: 'The file type is not valid, please use only valid files:\r\n%0',
// The file isn't an accepted type for images
nonImageExtension: 'You must select an image',
// The width of the image is over the allowed maximum
imageTooWide: 'The image is too wide',
// The height of the image is over the allowed maximum
imageTooTall: 'The image is too tall'
});
오류 메시지가 아닌 전체 스택 추적을 포함하도록 질문을 편집 할 수 있습니까? 이것이 오류가 실제로 발생하는 곳을 찾는 데 도움이됩니다. –
그 코드는 stacktrace가 아닙니다 :) 유용합니다 ...하지만 이제는 stacktrace를 사용하여 오류의 원인이되는 코드 행을 알려줍니다. offchance에서 당신은 루비 stacktrace가/look-like인지 알지 못합니다. (알아요, 거의 없습니다.) : http://railscasts.com/episodes/24-the-stack-trace?view=asciicast –
That said - 여기에 올릴 가능성이있는 유일한 LOC가 LangEntries가있는 유일한 스택 인 것처럼 보입니다 ... 그래서 stacktrace가 우리에게 훨씬 더 많은 것을주지 않을 것입니다. 하지만이 모든 것을 호출하는 * 코드의 일부를 찾아 낼 수 있습니다. 그러면 올바르게 설정되지 않은 것을 알아낼 수 있습니다. –