Replies button is missing


  • Winner of the 2016 Presidential Election

    Or at least, I can't find it. Was it removed? If so, why?



  • @sloosecannon The latest :no_entry_sign::baby_bottle: 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...

    https://what.thedailywtf.com/post/1153723



  • 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?


  • sockdevs

    Markup comparison:

    WTDWTF:
    0_1494499259611_8f6b9b32-0d64-47fa-a651-f91b721e8117-image.png

    Community Dot Node Bee Bee:
    0_1494499337346_ba3c0736-13f6-41db-8df3-ebf6f2a43c0c-image.png

    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.


  • sockdevs

    @boomzilla There's nothing new in the user settings either...



  • @RaceProUK Nope...and nothing I could find in the admin panel, either.


  • sockdevs

    @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:
    0_1494503694434_a9489d61-5275-4dd5-944e-8b36674580ea-image.png

    That was after I originally posted this post, before any edits. I've since done a hard refresh, and it now looks like this:
    0_1494504006646_c2241d2a-31ef-4921-928c-40d70fbe4845-image.png

    This line looks significant too:


  • sockdevs

    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:

    0_1494505781422_840b498b-74f4-4beb-8a9c-01c7819524da-image.png



  • @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...


  • sockdevs

    @ben_lubar I fear compile-time type-checking is but a fevered dream...


  • sockdevs

    @ben_lubar Also, we have code to filter replies? :confused:



  • @RaceProUK said in Replies button is missing:

    @ben_lubar Also, we have code to filter replies? :confused:

    It's very important for Mafia to not leak club ded reply existence.


  • sockdevs

    @ben_lubar Ah, that makes sense


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.