Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. inna
    I
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 50
    • Best 6
    • Groups 0

    inna

    @inna

    8
    Reputation
    12
    Profile views
    50
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website pythonforum.ir Location Iran Age 26

    inna Unfollow Follow

    Best posts made by inna

    • RE: Google Recaptcha v3 not working

      @julian said in Google Recaptcha v3 not working:

      As far as I know ReCAPTCHA v3 should be working, I'll let @bentael know if there's been a change.

      Fine, thanks.

      @oplik0 said in Google Recaptcha v3 not working:

      v3 is not just "a better reCAPTCHA" and it is not replacing v2.

      v3 only offers "invisible" reCAPTCHA, but even if Spam Be Gone supported that (it doesn't yet) it still wouldn't work because it passes different data.
      reCAPTCHA v2 is binary - either user is a robot or not.
      v3 doesn't just pass "true||false" but instead passes a score from 0.0 to 1.0 and it's up to the application to determine what score is a success. It also never shows user a challenge as it's not supposed to interrupt the user in any way.

      So to sum it up: for Spam Be Gone to support v3 would mean changing the way it handles reCAPTCHA and I'm not even sure if it's a good idea. v3 is supposed to continuously chceck if user is a bot without interruptions, so it's best used for frequent user actions like posting or login, not for things like registration that happen once per user and it's not a big deal if it interrupts user with a challenge. So I'd say it'd be better for Spam Be Gone to extend its functionally to use v3 on login and posting, and leave v2 on the registration page.

      That convinced me 🙂 Thanks a lot.
      Unfortunately I'm not a developer and do not know how to develop a plugin, but I'll highly appreciate if it's developed by anyone (NodeBB team or another mate).

      posted in Technical Support
      I
      inna
    • RE: Who is using NodeBB?

      My Q/A forum for python programming language

      انجمن پایتون فارسی

      انجمن پایتون فارسی

      انجمن فارسی پایتون، انجمنی برای آموزش و آزمودن. فروم فارسی پایتون و تالارهای پرسش و پاسخ

      posted in General Discussion
      I
      inna
    • RE: How to be noticed of new posts by email?

      @julian said in How to be noticed of new posts by email?:

      @inna hello!

      This is likely the plugin you are looking for 🙂

      https://github.com/NodeBB/nodebb-plugin-category-notifications

      @julian hello,

      Thanks 🙂

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @baris that was fine and nothing was wrong with hierarchy.
      It seemed it took some time to affect the changes. Now it's as you wrote down, and my forum is working.
      The issue is solved, thanks.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj thanks a lot, it works fine:)
      Thanks a lot for helping me.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj Sure, why not:)
      In the path /to_your_nodebb_path/node_modules/nodebb-theme-persona/library.js (or whatever file and path you want to add), after the first line which is 'use strict';, add these lines below the first line:

      const helpers = require.main.require('./src/controllers/helpers');
      const categories = require.main.require('./src/categories');
      const meta = require.main.require('./src/meta');
      const relative_path = require.main.require('nconf').get('relative_path');
      helpers.buildCategoryBreadcrumbs = async function (cid) {
      	const breadcrumbs = [];
      
      	while (parseInt(cid, 10)) {
      		/* eslint-disable no-await-in-loop */
      		const data = await categories.getCategoryFields(cid, ['name', 'slug', 'parentCid', 'disabled', 'isSection']);
      		if (!data.disabled) {
      			breadcrumbs.unshift({
      				text: String(data.name),
      				url: `${relative_path}/category/${data.slug}`,
      				cid: cid,
      			});
      		}
      		cid = data.parentCid;
      	}
      		if (meta.config.homePageRoute && meta.config.homePageRoute !== 'categories') {
      			breadcrumbs.unshift({
      				text: '[[global:header.categories]]',
      				url: `${relative_path}/categories`,
      			});
      		}
      
      		breadcrumbs.unshift({
      			text: '[[global:home]]',
      			url: `${relative_path}/`,
      		});
      
      	return breadcrumbs;
      };
      

      Then comment out line starting with var meta by adding two //:

      //var meta = require.main.require('./src/meta');
      

      Then you can restart by either of these ways:

      • /nodebb_path/nodebb restart
      • service nodebb restart
      • systemctl restart nodebb

      Regarding custom plugin, I'll consider it soon.

      posted in General Discussion
      I
      inna

    Latest posts made by inna

    • RE: NodeBB MongoError: Authentication failed in Docker

      @gotwf thanks for the reply, let me explain some of them:

      "host": "node_db",
      

      The name node_db is the name that I specified for database container, and the name node_site is I chose for NodeBB container (nodebb_site has files).

      I tried both container's name and IP address of the container, but it seems there's another issue.

      As IPs of docker containers may change if I restart the server (172.17.0.0/16), it's better to use container's name.

      I also have changed bindIp option to bindIp: 127.0.0.1,172.24.0.4 and then try again but no luck. Also tried with bindIp: 0.0.0.0 but still no luck.

      I grepped localhost in /home/nodebb/node_modules/mongodb/lib/cmap/connection.js and changed it to node_db, but still no luck.

      I'm confused although connection is fine, where this authentication failed goes from and why.

      I commented the lines related to security and authorization in mongod.conf, but no luck.

      posted in General Discussion
      I
      inna
    • NodeBB MongoError: Authentication failed in Docker

      Hello,

      I'm trying move my current forum to a docker container, but I get this error when I start and then see nodebb's log:

          at readableAddChunk (internal/streams/readable.js:284:9)
      [cluster] Child Process (381) has exited (code: 0, signal: null)
      
      NodeBB v1.16.2 Copyright (C) 2013-2014 NodeBB Inc.
      This program comes with ABSOLUTELY NO WARRANTY.
      This is free software, and you are welcome to redistribute it under certain conditions.
      For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
      
      Clustering enabled: Spinning up 1 process(es).
      
      2021-04-02T20:29:11.773Z [4567/466] - info: Initializing NodeBB v1.16.2 http://DOMAIN.COM/
      (node:466) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
      (Use `node --trace-warnings ...` to show where the warning was created)
      2021-04-02T20:29:29.820Z [4567/466] - error: MongoError: Authentication failed.
          at MessageStream.messageHandler (/home/nodebb/node_modules/mongodb/lib/cmap/connection.js:268:20)
          at MessageStream.emit (events.js:315:20)
          at processIncomingData (/home/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
          at MessageStream._write (/home/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
          at writeOrBuffer (internal/streams/writable.js:358:12)
      [cluster] Child Process (466) has exited (code: 0, signal: null)
          at MessageStream.Writable.write (internal/streams/writable.js:303:10)
          at Socket.ondata (internal/streams/readable.js:719:22)
          at Socket.emit (events.js:315:20)
          at addChunk (internal/streams/readable.js:309:12)
          at readableAddChunk (internal/streams/readable.js:284:9)
      

      I checked config.json file and the database connection info, they're correct in my opinion (I've copied them from my current NodeBB forum which is running on a standalone VPS):

      {
          "url": "http://DOMAIN.COM/",
          "secret": "e7cfe25e-6916-4831-8c6f-5856b122bfa2",
          "database": "mongo",
          "port": "4567",
          "mongo": {
              "host": "node_db",
              "port": "27017",
              "username": "USER",
              "password": "PASS",
              "database": "DB"
          }
      }
      

      My mongo container is another one, and these two container can ping each other with no problem (there's no networking issue between them), but I don't know why NodeBB shows it cannot authenticate.

      Also when I run ./nodebb setup, I get the below logs:

      2021-04-02T20:35:15.917Z [485] - info: NodeBB Setup Triggered via Command Line
      
      Welcome to NodeBB v1.16.2!
      
      This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
      Press enter to accept the default setting (shown in brackets).
      2021-04-02T20:35:16.396Z [485] - info:
      Now configuring mongo database:
      (node:485) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
      (Use `node --trace-warnings ...` to show where the warning was created)
      2021-04-02T20:35:17.208Z [485] - warn: NodeBB Setup Aborted.
       MongoError: Authentication failed.
          at MessageStream.messageHandler (/home/nodebb/node_modules/mongodb/lib/cmap/connection.js:268:20)
          at MessageStream.emit (events.js:315:20)
          at processIncomingData (/home/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
          at MessageStream._write (/home/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
          at writeOrBuffer (internal/streams/writable.js:358:12)
          at MessageStream.Writable.write (internal/streams/writable.js:303:10)
          at Socket.ondata (internal/streams/readable.js:719:22)
          at Socket.emit (events.js:315:20)
          at addChunk (internal/streams/readable.js:309:12)
          at readableAddChunk (internal/streams/readable.js:284:9)
      

      I have also modified bindIp line and added nodebb's container name to allow connections, but I get this error.

      bindIp: 127.0.0.1,NAME
      

      telneting from NodeBB container to telnet mongo 27017 works fine and mongo "mongodb:NAME@27017" in command line of nodebb container works fine too.

      I also logged into MongoDB's shell with the exact username and password and that was right.

      It's I think clear that it cannot authenticate, but I do not know why and what's my issue that I did not notice.

      Could you please help me?

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj Sure, why not:)
      In the path /to_your_nodebb_path/node_modules/nodebb-theme-persona/library.js (or whatever file and path you want to add), after the first line which is 'use strict';, add these lines below the first line:

      const helpers = require.main.require('./src/controllers/helpers');
      const categories = require.main.require('./src/categories');
      const meta = require.main.require('./src/meta');
      const relative_path = require.main.require('nconf').get('relative_path');
      helpers.buildCategoryBreadcrumbs = async function (cid) {
      	const breadcrumbs = [];
      
      	while (parseInt(cid, 10)) {
      		/* eslint-disable no-await-in-loop */
      		const data = await categories.getCategoryFields(cid, ['name', 'slug', 'parentCid', 'disabled', 'isSection']);
      		if (!data.disabled) {
      			breadcrumbs.unshift({
      				text: String(data.name),
      				url: `${relative_path}/category/${data.slug}`,
      				cid: cid,
      			});
      		}
      		cid = data.parentCid;
      	}
      		if (meta.config.homePageRoute && meta.config.homePageRoute !== 'categories') {
      			breadcrumbs.unshift({
      				text: '[[global:header.categories]]',
      				url: `${relative_path}/categories`,
      			});
      		}
      
      		breadcrumbs.unshift({
      			text: '[[global:home]]',
      			url: `${relative_path}/`,
      		});
      
      	return breadcrumbs;
      };
      

      Then comment out line starting with var meta by adding two //:

      //var meta = require.main.require('./src/meta');
      

      Then you can restart by either of these ways:

      • /nodebb_path/nodebb restart
      • service nodebb restart
      • systemctl restart nodebb

      Regarding custom plugin, I'll consider it soon.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj thanks a lot, it works fine:)
      Thanks a lot for helping me.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj thanks, it's fine now, but there's an issue in the breadcrumbs links.
      Because my forums names are in Persian, there may some ASCII URLs.
      For example, link https://pythonforum.ir/category/5/ itself is fine, but when I go to it and I check the breadcrumbs links (category 5 is 2 levels up after the main site), its previous category link is https://pythonforum.ir/category/5/undefined/category/3/ and Home link is https://pythonforum.ir/category/5/undefined/ .
      To see this, I remain these changes in my website.
      This is log of Nodebb:

      [ { text: '[[global:home]]', url: 'undefined/' },
        { text: 'پایتون ۳', url: 'undefined/category/3/پایتون', cid: 3 } ]
      [ { text: '[[global:home]]', url: 'undefined/' },
        { text: 'قوانین، اطلاعیه‌ها و اخبار',
          url: 'undefined/category/1/قوانین-اطلاعیه-ها-و-اخبار',
          cid: 1 } ]
      [ { text: '[[global:home]]', url: 'undefined/' },
        { text: 'قوانین، اطلاعیه‌ها و اخبار',
          url: 'undefined/category/1/قوانین-اطلاعیه-ها-و-اخبار',
          cid: 1 } ]
      [ { text: '[[global:home]]', url: 'undefined/' },
        { text: 'پایتون ۳', url: 'undefined/category/3/پایتون', cid: 3 } ]
      

      Also if you remember and told me to add a console.log(breadcrumbs), it's still in the file but there's no output in the console tab.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj I did this and I get error at line 15:

      error: /category/5/%D9%BE%D8%B1%D8%B3%D8%B4-%D9%88-%D9%BE%D8%A7%D8%B3%D8%AE
      ReferenceError: relative_path is not defined
          at Object.helpers.buildCategoryBreadcrumbs (/some_path/node_modules/nodebb-theme-persona/library.js:15:14)
      

      Error in my forum is:

      relative_path is not defined

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj I'm really sorry for making this thread long and I appreciate you take your priceless time to me.

      I checked load.js and index.js and they have no lines containing with var meta. They just have const meta = require('../meta');. You can check them in Github repo too:
      https://github.com/NodeBB/NodeBB/blob/master/src/plugins/load.js
      https://github.com/NodeBB/NodeBB/blob/master/src/plugins/index.js

      I intended to comment out lines with var meta, but I found nothing.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @inna By the way, as I've here, I've entered some info, but I found something:

      at registerHooks (/some_path/src/plugins/load.js:159:13)
      at Plugins.loadPlugin (/some_path/src/plugins/load.js:122:4)
      

      The issue is Plugins.loadPlugin is in line 159, and registerHooks is in line 122.
      Should I report this to NodeBB Github issues? Is it related to Persona theme? Or just reporting here is enough to check it?

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj I've tried to check internal/modules/cjs/loader.js, but this path and this file does not exist.
      I also checked src/plugins/load.js and src/plugins/index.js, but they do not have any meta variable or such thing.

      I've also tried to commenting out them, these index.js and load.js files at given lines but I give errors, because I've been trying to commenting out registerHooks and Plugins.loadPlugin and Object.Plugins.requireLibrary.

      posted in General Discussion
      I
      inna
    • RE: Section name not being included in breadcrumb

      @pitaj this is it:

      2021-03-04T17:05:46.584Z [4567/600] - error: /some_path/node_modules/nodebb-theme-persona/library.js:37
      var meta = require.main.require('./src/meta');
          ^
      
      SyntaxError: Identifier 'meta' has already been declared
          at Module._compile (internal/modules/cjs/loader.js:723:23)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
          at Module.load (internal/modules/cjs/loader.js:653:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
          at Function.Module._load (internal/modules/cjs/loader.js:585:3)
          at Module.require (internal/modules/cjs/loader.js:692:17)
          at require (internal/modules/cjs/helpers.js:25:18)
          at Object.Plugins.requireLibrary (/some_path/src/plugins/index.js:60:38)
          at registerHooks (/some_path/src/plugins/load.js:159:13)
          at Plugins.loadPlugin (/some_path/src/plugins/load.js:122:4)
      
      posted in General Discussion
      I
      inna