New/Unread Posts indicator never appears
-
Thinking it might be tied to a recent NodeBB update, but every time a new post comes in, an error occurs and the "there's a new or unread post, click here to refresh" bar doesn't appear, though the counter on the "Unread" tab does change (well, most of the time, sometimes it gets out of sync for me).
Here's the callstack when the error occurs:
Uncaught TypeError: Cannot read property 'mainPid' of undefined a @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:14 i.emit @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 p.onevent @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 p.onpacket @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 (anonymous function) @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 i.emit @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 d.ondecoded @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 (anonymous function) @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 i.emit @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 p.add @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 d.ondata @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 (anonymous function) @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:5 i.emit @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 p.onPacket @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 (anonymous function) @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 i.emit @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 r.onPacket @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 r.onData @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4 ws.onmessage @ nodebb.min.js?f6cac876-c618-4331-985b-c8e37b2c9176:4
And here's the point in the code that fails (when prettified in Chrome's dev tools):
if (parseInt(e.topic.mainPid, 10) === parseInt(e.posts[0].pid, 10)) { return }
e.topic
is undefined there.
EDIT: Looks like it only fails to come up on new posts in existing topics. New topics work fine and make the bar show up.
I thought someone else posted about this issue (or something similar) in a topic, but I can't find it.
-
@ChaosTheEternal said in New/Unread Posts indicator never appears:
someone else posted about this issue (or something similar) in a topic,
-
I just noticed this is happening to me too.
-
Sometimes the red indicator appears, but there are no updates in the list. Other times updates are in the list, but no indicator.
At this point, I'm just training myself to check both, and don't trust the software to remain synchronized.
-
@cartman82 I just ignore the red counter and keep
/unread
open in another tab, which worked better before the "new post" indicator broke.
-
@ChaosTheEternal said in New/Unread Posts indicator never appears:
Uncaught TypeError: Cannot read property 'mainPid' of undefined
...
I thought someone else posted about this issue (or something similar) in a topic, but I can't find it.Pretty sure @ben_lubar opened an issue or submitted a PR for something like this but I can't find it now either.
@cartman82 / @blakeyrat : I think that when I was working on the ignore topic thing they didn't filter out ignored categories everywhere. Do you have certain things on ignore? That might explain it.
NB: I fixed that hole in my ignore-topic work, but they aren't ready to accept it. Disscussion here:
https://what.thedailywtf.com/topic/19702/ignoring-a-topic
-
@boomzilla said in New/Unread Posts indicator never appears:
@cartman82 / @blakeyrat : I think that when I was working on the ignore topic thing they didn't filter out ignored categories everywhere. Do you have certain things on ignore? That might explain it.
Does "ignore" exist? If so, where's the UI for it?
-
@blakeyrat There is an ignore button on a category's page (that turns to "watch" when you're ignoring the category).
There is no ignore yet for individual threads.
-
@boomzilla said in New/Unread Posts indicator never appears:
There is an ignore button on a category's page (that turns to "watch" when you're ignoring the category).
I didn't even know that existed. I think I've been to the categories page once ever. Don't see the point to it.
-
@blakeyrat I found it interesting that when I started a community.nodebb.org topic about ignoring a topic so it wouldn't show up on the unread page, people expressed the same opinion about Unread as you did about Categories.
-
@blakeyrat said in New/Unread Posts indicator never appears:
Don't see the point to it.
It lets you not see Mafia.
-
@Magus I should rephrase: I didn't see a point to it before I knew you could use it to ignore entire topics.
-
@boomzilla said in New/Unread Posts indicator never appears:
@blakeyrat There is an ignore button on a category's page (that turns to "watch" when you're ignoring the category).
There is no ignore yet for individual threads.
It's broken. I ignored Mafia and Current Game, but all of the threads are still in the unread (blue) style everywhere. I don't even use
/unread
, which is apparently the only place where that setting matters.I'd expect them to still show up in
/recent
, but they shouldn't look unread.
-
@anotherusername said in New/Unread Posts indicator never appears:
I ignored Mafia and Current Game, but all of the threads are still in the unread (blue) style everywhere
Hmm...I know that I made them not show blue in my ignore a thread code. I don't recall if I made sure that categories do that, too, though it doesn't seem to make that happen over on c.nodebb, where the ignore topic stuff is live, so probably not.
-
-
.....aaand apparently it was already fixed: