Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. eesty
    E
    • Profile
    • Following 0
    • Followers 1
    • Topics 3
    • Posts 4
    • Best 0
    • Groups 0

    eesty

    @eesty

    0
    Reputation
    4
    Profile views
    4
    Posts
    1
    Followers
    0
    Following
    Joined Last Online

    eesty Follow

    Latest posts made by eesty

    • Banning problem

      I've some overzealous moderators who like to ban people for trivial things.

      Can I stop moderators from being able to ban users?

      Also, is there are a way to let these moderators put users on a timed suspension instead? Or something like that...

      posted in Technical Support
      E
      eesty
    • RE: Upgrade error: fullname.substr is not a function

      success!
      thanks 🙂

      posted in Technical Support
      E
      eesty
    • Upgrade error: fullname.substr is not a function

      Hi,

      I've been trying to run an upgrade from 1.14.3 to 1.16.1 however the upgrade is failing at the "Create fullname search set" stage.

      The error reads:

      → [2020/9/11] Create fullname search set...
          [##           ] (1000/4613) 21% Error occurred
      Error occurred during upgrade: TypeError: u.fullname.substr is not a function
          at userData.filter.map.u (/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js:19:49)
          at Array.map (<anonymous>)
          at batch.processSortedSet.batch (/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js:19:6)
          at process._tickCallback (internal/process/next_tick.js:68:7)
      2021-01-17T14:26:01.301Z [4567/27161] - error: uncaughtException: u.fullname.substr is not a function
      TypeError: u.fullname.substr is not a function
          at userData.filter.map.u (/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js:19:49)
          at Array.map (<anonymous>)
          at batch.processSortedSet.batch (/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js:19:6)
          at process._tickCallback (internal/process/next_tick.js:68:7) {"error":{},"stack":"TypeError: u.fullname.substr is not a function\n    at userData.filter.map.u (/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js:19:49)\n    at Array.map (<anonymous>)\n    at batch.processSortedSet.batch (/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js:19:6)\n    at process._tickCallback (internal/process/next_tick.js:68:7)","exception":true,"date":"Mon Jan 18 2021 01:26:01 GMT+1100 (Australian Eastern Daylight Time)","process":{"pid":27161,"uid":0,"gid":0,"cwd":"/home/wtf/NodeBB","execPath":"/root/.nvm/versions/node/v10.15.3/bin/node","version":"v10.15.3","argv":["/root/.nvm/versions/node/v10.15.3/bin/node","/home/wtf/NodeBB/nodebb","upgrade"],"memoryUsage":{"rss":139489280,"heapTotal":113721344,"heapUsed":78097440,"external":22051721}},"os":{"loadavg":[2.603515625,2.49853515625,3.0625],"uptime":93440},"trace":[{"column":49,"file":"/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js","function":"userData.filter.map.u","line":19,"method":"u","native":false},{"column":null,"file":null,"function":"Array.map","line":null,"method":"map","native":false},{"column":6,"file":"/home/wtf/NodeBB/src/upgrades/1.15.0/fullname_search_set.js","function":"batch.processSortedSet.batch","line":19,"method":"batch","native":false},{"column":7,"file":"internal/process/next_tick.js","function":"process._tickCallback","line":68,"method":"_tickCallback","native":false}]}
      

      The error suggests to me that there is an issue with someone's full name.

      Some background info: my forum was originally a phpbb forum, which migrated to Discourse then finally to NodeBB. It's possible that a legacy username is invalid.

      posted in Technical Support
      E
      eesty
    • Post Index ID

      The templating system allows for some variables to be use when looping through posts in a topic.

      For example, @first, @last

      <!-- BEGIN posts -->
      <!-- IF @first -->
        <h1>Main Author: {posts.username}</h1>
      <!-- ENDIF @first -->
      {posts.content}
      <!-- IF @last -->
        End of posts. Click here to scroll to the top.
      <!-- ENDIF @last -->
      <!-- END posts -->
      

      The BenchpressJS documentation says that @index @key and @value are available too.
      Indeed when you print out @index it will show the index of the post DISPLAYED in the topic, with 0 being the first post displayed on the page.

      I'm trying to create a modification to my template so that some HTML is displayed after the second post. Therefore my logic would be:

      
      <!-- IF @index == 1 -->
       Some HTML Goes here
      <!-- ENDIF @index == 1  -->
      
      

      It seems that these kind of conditionals can't be used.
      So what would be a way to get HTML to render after the Nth post in a topic page (with pagination enabled).

      posted in NodeBB Development
      E
      eesty