Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. danielflippance
    • Profile
    • Following 0
    • Followers 0
    • Topics 13
    • Posts 25
    • Best 2
    • Groups 0

    danielflippance

    @danielflippance

    2
    Reputation
    867
    Profile views
    25
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    danielflippance Follow

    Best posts made by danielflippance

    • RE: Theme Images

      Thanks @yariplus. I moved the staticDirs to a new plugin.json, I added a package.json and the problem is now fixed.

      posted in Technical Support
      danielflippance
      danielflippance
    • RE: NodeBB SSO Plug-in Flow

      Found the problem: Step 3 requires that the server accept HTTP POST - I was only accepting GET.

      posted in General Discussion
      danielflippance
      danielflippance

    Latest posts made by danielflippance

    • Child Categories not visible to guests even though permissions allow find/access/read

      I have a forum with 2 levels of categories. When logged in as an admin all categories and sub-categories are visible, but when browsing as an anonymous guest, the sub-categories cannot be seen. NodeBB is v0.9.2.

      I've checked the permissions on the sub-categories and they are set as follows. I've also tried resetting and setting the permissions back but no difference:

      0_1467353814837_Screen Shot 2016-06-30 at 11.16.08 PM.png

      I checked the code and the children are definitely being filtered out due to permissions. If I comment out the following lines of code in /src/categories.js the sub-categories show.

      244 function (children, next) {
      245   privileges.categories.filterCids('find', children, uid, next);
      246 },
      

      I added the following to the UI to see if the .children array is empty and it is - "We have children" never shows to guests:

      <p><!-- IF ../children.length -->We have children<!-- ENDIF ../children.length --></p>
      

      Here's my full UI code. Nothing inside the second <ul> renders:

      <!-- IMPORT partials/breadcrumbs.tpl -->
      <h1 class="categories-title">[[pages:categories]]</h1>
      
      <ul class="home-category-list categories" itemscope itemtype="http://www.schema.org/ItemList">
      
      <!-- BEGIN categories -->
      
      	<h2 class="title top-level-category">
      		<!-- IMPORT partials/categories/link.tpl --><br />
      		<div class="description">
      		{../descriptionParsed}
      		</div>
      	</h2>
      
      	<p><!-- IF ../children.length -->We have children<!-- ENDIF ../children.length --></p>
      
      	<ul class="home-sub-category-list categories" itemscope itemtype="http://www.schema.org/ItemList">
      		<!-- BEGIN children -->
      		<!-- IMPORT partials/categories/item.tpl -->
      		<!-- END children -->
      	</ul>
      	<div class="clearfix divider"></div>
      <!-- END categories -->
      </ul>
      posted in Technical Support
      danielflippance
      danielflippance
    • recent.rss - Not Found

      I see that https://community.nodebb.org/recent.rss currently returns:

      Not Found
      You seem to have stumbled upon a page that does not exist. Return to the home page.

      Is that feature still available?

      See also: RSS feed of the entire board?

      posted in General Discussion
      danielflippance
      danielflippance
    • RE: Read process.env.NODE_ENV in the footer

      Perfect, thank you!

      posted in NodeBB Development
      danielflippance
      danielflippance
    • Read process.env.NODE_ENV in the footer

      I need to access process.env.NODE_ENV in the footer to see if my site is in production. I first tried creating a route for /api/footer and outputting {isProduction: process.env.NODE_ENV === 'production' } but the result wasn't accessible in the footer.

      I've tried putting the value in /src/middleware/header.js but that unsurprisingly didn't work.

      As I need it in every page in the site, I don't want to update all of the /api/* routes. Is there some other way to get this value in the footer?

      BTW - The reason is need this is so that I can conditionally add the Google Tag Manager but only in the production environment so my code looks like:

      <!-- IF isProduction -->
      <google tag manager code>
      <!-- ENDIF isProduction -->

      posted in NodeBB Development
      danielflippance
      danielflippance
    • Login Page Blank

      My login page is (almost) entirely blank on my production server but works ok on dev and staging (heroku). I can see the home page and I can create an account and see the profile page, but I cannot login to an existing account:

      0_1458756653665_Screen Shot 2016-03-21 at 12.41.34 PM.png

      There are no javascript errors in the browser and no errors in the server side log:

      21/3 14:33 [24540] - info: NodeBB v0.9.2 Copyright (C) 2013-2014 NodeBB Inc.
      21/3 14:33 [24540] - info: This program comes with ABSOLUTELY NO WARRANTY.
      21/3 14:33 [24540] - info: This is free software, and you are welcome to redistribute it under certain conditions.
      21/3 14:33 [24540] - info:
      21/3 14:33 [24540] - info: Time: Mon Mar 21 2016 14:33:07 GMT-0500 (PET)
      21/3 14:33 [24540] - info: Initializing NodeBB v0.9.2
      21/3 14:33 [24540] - info: Environment: production
      21/3 14:33 [24540] - verbose: * using mongo store at xx.xx.xx.xx:xxxx
      21/3 14:33 [24540] - verbose: * using themes stored in: /var/www/blahblahblah/live/node_modules
      21/3 14:33 [24540] - info: [database] Checking database indices.
      21/3 14:33 [24540] - verbose: Checking dependencies for outdated modules
      21/3 14:33 [24540] - verbose: [notifications.init] Registering jobs.
      21/3 14:33 [24540] - verbose: [meta/css] Minifying LESS/CSS
      21/3 14:33 [24540] - verbose: [sounds] Sounds OK
      21/3 14:33 [24540] - verbose: [meta/templates] Compiling templates
      21/3 14:33 [24540] - verbose: [meta/templates] Successfully compiled templates.
      21/3 14:33 [24540] - verbose: [meta/css] admin.css committed to disk.
      21/3 14:33 [24540] - verbose: [meta/css] stylesheet.css committed to disk.
      21/3 14:33 [24540] - verbose: [meta/js] Minification complete
      21/3 14:33 [24540] - verbose: [hotswap] Router with id plugins replaced successfully
      21/3 14:33 [24540] - verbose: [plugins] All plugins reloaded and rerouted
      21/3 14:33 [24540] - verbose: [hotswap] Router with id auth replaced successfully
      21/3 14:33 [24540] - verbose: [meta/js] Client-side minfile committed to disk.
      21/3 14:33 [24540] - info: NodeBB Ready
      21/3 14:33 [24540] - info: Enabling 'trust proxy'
      21/3 14:33 [24540] - info: NodeBB is now listening on: 0.0.0.0:4567

      posted in General Discussion
      danielflippance
      danielflippance
    • Login Page (Almost ) Blank - Can't Login

      My login page is (almost) entirely blank on my production server but works ok on dev and staging (heroku). I can see the home page and I can create an account and see the profile page, but I cannot login to an existing account:

      0_1458589372352_Screen Shot 2016-03-21 at 12.41.34 PM.png

      There are no javascript errors in the browser and no errors in the server side log:

      21/3 14:33 [24540] - info: NodeBB v0.9.2 Copyright (C) 2013-2014 NodeBB Inc.
      21/3 14:33 [24540] - info: This program comes with ABSOLUTELY NO WARRANTY.
      21/3 14:33 [24540] - info: This is free software, and you are welcome to redistribute it under certain conditions.
      21/3 14:33 [24540] - info:
      21/3 14:33 [24540] - info: Time: Mon Mar 21 2016 14:33:07 GMT-0500 (PET)
      21/3 14:33 [24540] - info: Initializing NodeBB v0.9.2
      21/3 14:33 [24540] - info: Environment: production
      21/3 14:33 [24540] - verbose: * using mongo store at xx.xx.xx.xx:xxxx
      21/3 14:33 [24540] - verbose: * using themes stored in: /var/www/blahblahblah/live/node_modules
      21/3 14:33 [24540] - info: [database] Checking database indices.
      21/3 14:33 [24540] - verbose: Checking dependencies for outdated modules
      21/3 14:33 [24540] - verbose: [notifications.init] Registering jobs.
      21/3 14:33 [24540] - verbose: [meta/css] Minifying LESS/CSS
      21/3 14:33 [24540] - verbose: [sounds] Sounds OK
      21/3 14:33 [24540] - verbose: [meta/templates] Compiling templates
      21/3 14:33 [24540] - verbose: [meta/templates] Successfully compiled templates.
      21/3 14:33 [24540] - verbose: [meta/css] admin.css committed to disk.
      21/3 14:33 [24540] - verbose: [meta/css] stylesheet.css committed to disk.
      21/3 14:33 [24540] - verbose: [meta/js] Minification complete
      21/3 14:33 [24540] - verbose: [hotswap] Router with id plugins replaced successfully
      21/3 14:33 [24540] - verbose: [plugins] All plugins reloaded and rerouted
      21/3 14:33 [24540] - verbose: [hotswap] Router with id auth replaced successfully
      21/3 14:33 [24540] - verbose: [meta/js] Client-side minfile committed to disk.
      21/3 14:33 [24540] - info: NodeBB Ready
      21/3 14:33 [24540] - info: Enabling 'trust proxy'
      21/3 14:33 [24540] - info: NodeBB is now listening on: 0.0.0.0:4567

      posted in Technical Support
      danielflippance
      danielflippance
    • RE: Minifer.js not found; nodebb.min.js not created

      Found the answer - The script starting NodeBB must be in the nodebb directory otherwise the minifier will fail as above. Changed my Upstart script as follows:

      cd $LIVE_DIR
      exec node app.js >> /var/log/blahblahblah/nodebb.log
      posted in Technical Support
      danielflippance
      danielflippance
    • RE: Minifer.js not found; nodebb.min.js not created

      It's failing on this line in /src/meta/js.js:

      var minifier = Meta.js.minifierProc = fork('minifier.js', [], forkProcessParams),
      

      Are there some special permissions or configuration I need to setup to allow a process to be forked?

      I've tried running node with each of the following command lines, both giving similar results:

      exec node $LIVE_DIR/loader.js --no-silent --no-daemon >> /var/log/blahblahblah/nodebb.log
      exec node $LIVE_DIR/app.js >> /var/log/blahblahblah/nodebb.log
      posted in Technical Support
      danielflippance
      danielflippance
    • Minifer.js not found; nodebb.min.js not created

      I'm seeing the following error when starting NodeBB on my production server:

      module.js:340
          throw err;
                ^
      Error: Cannot find module '/minifier.js'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Function.Module.runMain (module.js:497:10)
      at startup (node.js:119:16)
      at node.js:935:3
      

      The same code runs correctly on dev and our staging server (Heroku). We are running on Ubuntu and NodeBB is being started by Upstart. As far as I can tell the minifer code is in place - this is the file on the prod server:

      1623 Mar 21 12:39 minifier.js
      

      I've run npm install in the nodebb folder and everything is up to date. Here is the verbose log from NodeBB:

      21/3 13:12 [24179] - info: NodeBB v0.9.2 Copyright (C) 2013-2014 NodeBB Inc.
      21/3 13:12 [24179] - info: This program comes with ABSOLUTELY NO WARRANTY.
      21/3 13:12 [24179] - info: This is free software, and you are welcome to redistribute it under certain conditions.
      21/3 13:12 [24179] - info: 
      21/3 13:12 [24179] - info: Time: Mon Mar 21 2016 13:12:54 GMT-0500 (PET)
      21/3 13:12 [24179] - info: Initializing NodeBB v0.9.2
      21/3 13:12 [24179] - info: Environment: production
      21/3 13:12 [24179] - verbose: * using mongo store at xxx.xxx.xxx.xxx:xxxx
      21/3 13:12 [24179] - verbose: * using themes stored in: /var/www/blahblahblah/node_modules
      21/3 13:12 [24179] - info: [database] Checking database indices.
      21/3 13:13 [24179] - verbose: Checking dependencies for outdated modules
      21/3 13:13 [24179] - verbose: [notifications.init] Registering jobs.
      21/3 13:13 [24179] - verbose: [meta/css] Minifying LESS/CSS
      21/3 13:13 [24179] - verbose: [sounds] Sounds OK
      21/3 13:13 [24179] - verbose: [meta/templates] Compiling templates
      21/3 13:13 [24179] - verbose: [meta/templates] Successfully compiled templates.
      21/3 13:13 [24179] - verbose: [meta/css] admin.css committed to disk.
      21/3 13:13 [24179] - verbose: [meta/css] stylesheet.css committed to disk.
      

      The log always stops at this point. It seems to be the case that the following line in webserver.js fails:

      async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, app.enabled('minification')),
      

      The user running nodeBB has write permission to the /public folder where the nodebb.min.js will be created.

      Interestingly, if I manually add the nodebb.min.js to the /public folder, hack that line to force meta.js.getFromFIle, NodeBB starts but the login page is blank apart from the header and there are no JS script errors.

      posted in Technical Support
      danielflippance
      danielflippance
    • Heroku deployment guide?

      The wiki link seems to be broken - are there instructions somewhere else now?

      posted in General Discussion
      danielflippance
      danielflippance