Replies button is missing
-
Or at least, I can't find it. Was it removed? If so, why?
-
@sloosecannon The latest update has introduced some amazing new features you're going to love:
- "[n] replies" indicators are hidden
- jelly potato now unloads and skips posts while you're scrolling
- image upload only works on latest Chrome
-
Until we get it back, I wrote a script that unhides it...
-
It's still visible over at community.nodebb.org, with little avatars next to the button so you can quickly see who replied. @ben_lubar is there something custom to our site that is breaking this?
-
Markup comparison:
WTDWTF:
Community Dot Node Bee Bee:
So it's definitely something not right on our setup.
-
@RaceProUK Weird. I looked for
hidden
in our customizations and this is what I found:plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:11: raw.setAttribute('class', 'content raw-content loading hidden'); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:22: raw.classList.remove('hidden'); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:23: post.classList.add('hidden'); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:31: } else if (!raw || raw.classList.contains("hidden")) { plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:66: if (post.classList.contains("hidden")) { plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:67: raw.classList.add("hidden"); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:68: post.classList.remove("hidden"); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:71: post.classList.add("hidden"); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:72: raw.classList.remove("hidden"); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:120: var r = e.querySelector('.raw-content'), h = r.classList.contains('hidden'); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:121: r.classList.remove('hidden'); plugins/nodebb-plugin-tdwtf-customizations/post-tools.js:123: r.classList.toggle('hidden', h); plugins/nodebb-plugin-tdwtf-customizations/custom.less:329: [component="post/parent"].hidden-xs { plugins/nodebb-plugin-tdwtf-customizations/custom.less:344: overflow-y: hidden; plugins/nodebb-plugin-tdwtf-customizations/custom.less:881: overflow: hidden; plugins/nodebb-plugin-tdwtf-customizations/custom.less:904: &:empty, &.hidden + a, &:empty + a { plugins/nodebb-plugin-tdwtf-customizations/custom.less:994:#search-form #search-button.hidden { plugins/nodebb-plugin-tdwtf-customizations/custom.less:1298: a[data-username]:not(:hover), [component="header/username"]:not(:hover), .plugin-mentions-a:not(:hover), [component="topic/header"] > .hidden-xs > a:not(:hover) { plugins/nodebb-plugin-tdwtf-customizations/custom.js:147: $('[component="navbar/title"] span:hidden').addClass('hidden').removeAttr('style');
Basically, just three files:
plugins/nodebb-plugin-tdwtf-customizations/post-tools.js
plugins/nodebb-plugin-tdwtf-customizations/custom.less
plugins/nodebb-plugin-tdwtf-customizations/custom.js
But none of those look like the culprit here.
-
@boomzilla There's nothing new in the user settings either...
-
@RaceProUK Nope...and nothing I could find in the admin panel, either.
-
@boomzilla I've found the offending line:
My guess is
count
is coming back as zero for all posts, regardless of how many replies there really are.Edit: Eyup:
That was after I originally posted this post, before any edits. I've since done a hard refresh, and it now looks like this:
This line looks significant too:
-
Paging @ben_lubar
This is where I'm up to now:
I think this function is where the real issue lies.
Edit: The function is new as of the latest update, and there was also a change here:
-
@boomzilla I think it's hidden by default until whatever in NodeBB "adds" them. And that part isn't working, so they're left hidden.
-
@RaceProUK Ah, our code to filter replies is broken, then. They changed an integer to a struct but we're still giving them an integer.
I wonder if anyone has invented a language with a stronger type system where this would be a compile-time error...
-
@ben_lubar I fear compile-time type-checking is but a fevered dream...
-
@ben_lubar Also, we have code to filter replies?
-
@RaceProUK said in Replies button is missing:
@ben_lubar Also, we have code to filter replies?
It's very important for Mafia to not leak club ded reply existence.
-
@ben_lubar Ah, that makes sense