我一直在使用 Composer Help Button Plugin,它一直运行正常,直到我刚刚更新到 3.2.0.beta2-dev latest-release +246
我很想得到任何帮助或见解!
当我点击插件的 composer 按钮时,日志文件的内容如下……
composer-help.js:21 Uncaught TypeError: Cannot read properties of undefined (reading ‘ajax’)
at e.init (composer-help.js:21:1)
at e.r [as init] (index.js:383:1)
at g (core_object.js:122:1)
at e.create (core_object.js:626:1)
at v.create (index.js:446:1)
at index.js:302:1
at l (index.js:245:1)
at o.lookup (index.js:130:1)
at e.lookup (container_proxy.js:79:1)
at l.show (modal.js:162:32)
at i (show-modal.js:35:23)
at e.showComposerHelp (composer-help.js:15:1)
at B._run (index.ts:665:23)
at B._join (index.ts:640:19)
at B.join (index.ts:362:17)
at p (index.js:156:1)
at index.js:707:1
at e.flaggedInstrument (index.js:126:1)
at index.js:706:1
at index.js:665:1
at runtime.js:5762:1
at o._triggerAction (d-button.gjs:187:13)
at o.click (d-button.gjs:151:17)
init @ composer-help.js:21
r @ index.js:383
g @ core_object.js:122
create @ core_object.js:626
create @ index.js:446
(anonymous) @ index.js:302
l @ index.js:245
lookup @ index.js:130
lookup @ container_proxy.js:79
show @ modal.js:162
i @ show-modal.js:35
showComposerHelp @ composer-help.js:15
B._run @ index.ts:665
B._join @ index.ts:640
B.join @ index.ts:362
p @ index.js:156
(anonymous) @ index.js:707
e.flaggedInstrument @ index.js:126
(anonymous) @ index.js:706
(anonymous) @ index.js:665
(anonymous) @ runtime.js:5762
_triggerAction @ d-button.gjs:187
click @ d-button.gjs:151
这是控制台中红色下划线部分的内容……
_ajax.default.ajax(Discourse.SiteSettings.composer_help_modal_url + '.json').then(function (resp) {
这是插件的 Javascript 文件……
define("discourse/plugins/discourse-plugin-composer-help-button/discourse/controllers/composer-help", ["exports", "discourse/mixins/modal-functionality", "discourse/lib/ajax"], function (_exports, _modalFunctionality, _ajax) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
0; //eaimeta@70e063a35619d71f0,"discourse/mixins/modal-functionality",0,"discourse/lib/ajax"eaimeta@70e063a35619d71f
var _default = _exports.default = Ember.Controller.extend(_modalFunctionality.default, {
loading: true,
parsedContent: '',
refresh: function () {
this.set("loading", true);
},
init: function () {
this._super();
this.setProperties({
"loading": true,
"parsedContent": ''
});
_ajax.default.ajax(Discourse.SiteSettings.composer_help_modal_url + '.json').then(function (resp) {
this.set('parsedContent', resp.post_stream.posts[0].cooked);
this.refresh();
}.bind(this));
}
});
});
您好!我最近安装了这个插件,也注意到帮助按钮无法正常工作。