NodeBB Template results in something completely wrong



  • Hi, I'm working on a theme extending Vanilla. See https://battle-realms.fr/.

    I've got a problem where NodeBB generates something completely wrong on my hompage. Here's the associated template part:

              <div class="content-container">
                <img src="\{categories.children.posts.user.picture\}" class="pull-left img-circle" />
                <a href="{relative_path}/topic/\{categories.children.posts.topic.slug\}<!-- IF categories.children.posts.index -->/\{categories.children.posts.index}<!-- ENDIF categories.children.posts.index -->">
                  <div>
                    <div class="content">\{categories.children.posts.content\}</div>
                    <div class="home-fade"></div>
                  </div>
                </a>
              </div>
    

    As you can see there's a div inside a a here.
    Now the result:

    <div class="content-container">
      <img src="https://secure.gravatar.com/avatar/e0f46640ee183127e536c55b660aafe3?size=256&amp;default=retro&amp;rating=pg" class="pull-left img-circle">
      <a href="/topic/5/téléchargements/2">
        </a><div><a href="/topic/5/téléchargements/2">
          </a><div class="content"><!-- SNIP --></div>
          <div class="home-fade"></div>
        </div>
    </div>
    

    A complete mess. The a is closed before the the div it's supposed to contain starts, it inserted another a in this div (wtf?) and multiple other ones in the content.
    You can see how wrong it looks on my mainpage, second post of first category in second section.
    Here's a screenshot:
    Wrong!

    My question is, wtf is NodeBB doing here? How can I fix this?

    EDIT: Added some \ in the code snippets to prevent NodeBB from removing things in braces



  • Opened issue https://github.com/NodeBB/NodeBB/issues/2882
    This is very strange and should be fixed. If it comes from me doing something invalid, it should output some error or warning somewhere. Something has to be done, whatever the cause of this is.


  • Admin

    What version of t.js is installed?




 

| |

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.