Didn’t investigate as I don’t have the know how. But I do know that ever since I’ve installed 2.2.1 when I click on a canned response nothing happens. This happens randomly, I can’t replicate it at will. Sometimes they work, sometimes they don’t. I have to reload the whole site for it to work.
This is what shows up in the console:
TypeError: i.get(“topic.posters”)[0].user.get is not a function. (In ‘i.get(“topic.posters”)[0].user.get(“username”)’, ‘i.get(“topic.posters”)[0].user.get’ is undefined)
Uncaught TypeError: i.get(...)[0].user.get is not a function
at e.default (plugin-7414be04de5897403a5c16f2d50f60ddba9e5725993124e89d0a9ae3f0942a92.js:1)
at n.apply (plugin-7414be04de5897403a5c16f2d50f60ddba9e5725993124e89d0a9ae3f0942a92.js:1)
at n.send (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:16)
at n [as send] (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:15)
at n.triggerAction (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:15)
at n.s [as sendAction] (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:16)
at n.click (application-6157201f89cbc41715dde34af85ed4c9d799cece2e11aac8f0710af120c2affd.js:27)
at n.trigger (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:16)
at n [as trigger] (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:15)
at e._run (ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:9)
No clue what that means Any guidance would be appreciated.
Thank you for reopening. I will try to find a way to replicate it but it’s so random it’s not even funny. It can go hours without a problem, then for 30 min nothing but problems. And it’s been like that since the upgrade.
When the update was performed, no other plugins were updated, they were already at their latest version.
Only procourse-static-pages was added but I doubt this has to do with anything.
This happened prior to installing that plugin so it shouldn’t be that.
As far as the PM claim, not 100% sure on that. It’s just that I use canned responses for mainly PM’s, but so far didn’t get a problem using them in topics, only PM’s. So for now we can assume it’s PM only but can’t totally rule out topics just yet.
Still haven’t been able to replicate it. But, today I had another bug I’ve had since I’ve started using discourse. It’s rare, but it happens and it may be related. When I open up the composer and click the canned replies icon nothing happens, they just don’t open. The console gives me this: TypeError: undefined is not an object (evaluating ‘t.actions’)
I’ve tried safe mode like you’ve asked, turned off the custom theme + plugins. I only left the official plugins. The problem is still there and the console still throws:
Uncaught TypeError: i.get(…)[0].user.get is not a function
It points to this piece of code:
exports.default = function (replyId, replyTitle, replyContent, model) {
// Replace variables with values.
if (model) {
var vars = {
user: model.get("user.username"),
original_poster: model.get("topic.posters") ? model.get("topic.posters")[0].user.get("username") : "",
reply_to: model.get("post.reply_to_user.username"),
last_user: model.get("topic.last_poster_username"),
reply_to_or_last: model.get("post.reply_to_user.username") || model.get("topic.last_poster_username")
};
for (var key in vars) {
if (vars[key]) {
replyTitle = replyTitle.replace("%{" + key + "}", vars[key]);
replyContent = replyContent.replace("%{" + key + "}", vars[key]);
}
Again, this only happens in PMs (so far).
My question is, is the safe-mode a reliable way to test? I mean, since I’ve disabled my custom plugins and theme and was able to encounter this error, then I am in the clear and something else is up, right?
EDIT: Like I’ve said before, can’t replicate this at will. But it happens in PM’s where there are usually more than two people invited.
EDIT2: I am on 2.2.1 so not sure why someone changed the topic to “previous version”.