Skip to content

nodebb-plugin-customize error

Solved Customisation
  • @riekmedia You probably need to adjust the client_max_body_size directive in nginx.conf to be larger that what is already defined

    I’m making some assumptions here dependant on the version of Linux you are running (basing on Ubuntu), but this should help

    1. Edit the nginx.conf file as below
      sudo nano /etc/nginx/nginx.conf
    2. Locate the value client_max_body_size 2M; (note that it may be missing, or set higher than this value)
    3. Increase the value dependant on needs - for example, 20M
    4. Save the nginx.conf file
    5. Restart NGINX using service nginx reload or if using systemd, sudo systemctl reload nginx.service
  • @phenomlab i have this, not work, same error

    my complete nginx.conf

    user  nginx;
    worker_processes  auto;
    
    error_log  /var/log/nginx/error.log notice;
    pid        /var/run/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
    
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
    
        access_log  /var/log/nginx/access.log  main;
    
        sendfile        on;
        #tcp_nopush     on;
    
        client_max_body_size 50M;   <----  here the entry
    
        keepalive_timeout  65;
    
        #gzip  on;
    
        include /etc/nginx/conf.d/*.conf;
    }
    
    
  • @riekmedia Anything recorded in /var/log/nginx/error.log ?

  • @phenomlab no errors in the log file

    2021/10/19 14:00:52 [notice] 1984#1984: signal 15 (SIGTERM) received from 2037, exiting
    2021/10/19 14:00:52 [notice] 1985#1985: exiting
    2021/10/19 14:00:52 [notice] 1986#1986: exiting
    2021/10/19 14:00:52 [notice] 1985#1985: exit
    2021/10/19 14:00:52 [notice] 1986#1986: exit
    2021/10/19 14:00:52 [notice] 1984#1984: signal 15 (SIGTERM) received from 1, exiting
    2021/10/19 14:00:52 [notice] 1985#1985: signal 15 (SIGTERM) received from 1, exiting
    2021/10/19 14:00:52 [notice] 1986#1986: signal 15 (SIGTERM) received from 1, exiting
    2021/10/19 14:00:52 [notice] 1987#1987: signal 15 (SIGTERM) received from 1, exiting
    2021/10/19 14:00:52 [notice] 1987#1987: exiting
    2021/10/19 14:00:52 [notice] 1988#1988: signal 15 (SIGTERM) received from 1, exiting
    2021/10/19 14:00:52 [notice] 1988#1988: exiting
    2021/10/19 14:00:52 [notice] 1987#1987: exit
    2021/10/19 14:00:52 [notice] 1988#1988: exit
    2021/10/19 14:00:52 [notice] 1984#1984: signal 17 (SIGCHLD) received from 1988
    2021/10/19 14:00:52 [notice] 1984#1984: worker process 1985 exited with code 0
    2021/10/19 14:00:52 [notice] 1984#1984: worker process 1988 exited with code 0
    2021/10/19 14:00:52 [notice] 1984#1984: worker process 1986 exited with code 0
    2021/10/19 14:00:52 [notice] 1984#1984: worker process 1987 exited with code 0
    2021/10/19 14:00:52 [notice] 1984#1984: exit
    2021/10/19 14:00:52 [notice] 2038#2038: using the "epoll" event method
    2021/10/19 14:00:52 [notice] 2038#2038: nginx/1.21.3
    2021/10/19 14:00:52 [notice] 2038#2038: built by gcc 8.3.0 (Debian 8.3.0-6) 
    2021/10/19 14:00:52 [notice] 2038#2038: OS: Linux 4.19.0-17-amd64
    2021/10/19 14:00:52 [notice] 2038#2038: getrlimit(RLIMIT_NOFILE): 1024:524288
    2021/10/19 14:00:52 [notice] 2039#2039: start worker processes
    2021/10/19 14:00:52 [notice] 2039#2039: start worker process 2040
    2021/10/19 14:00:52 [notice] 2039#2039: start worker process 2041
    2021/10/19 14:00:52 [notice] 2039#2039: start worker process 2042
    2021/10/19 14:00:52 [notice] 2039#2039: start worker process 2043
    
    
  • @riekmedia Ok. I’d expect a different looking nginx.conf log rather than just the default. Are there any others ? For example, a file that contains items that look like the below

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_redirect off;
    
        # Socket.io Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        location @nodebb {
            proxy_pass http://127.0.0.1:4567;
        }
    
  • @phenomlab yes that would be the default.conf where the domains are stored

    /etc/nginx/conf.d/default.conf

    server {
        listen       80;
        server_name  community.riekmedia.dev;
    
        root   /var/www/community/NodeBB;
        index  index.php index.html index.htm;
    
       location / {
        if ($request_uri ~ ^/(.*)\.html$) {
            return 302 /$1;
            }
        }
    
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /var/www;
        }
            location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass   unix:/var/run/php/php8.0-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include        fastcgi_params;
    	
        }
    
    }
    
    
  • @riekmedia Ok, but there should be one at least for NodeBB to function properly

    The Nginx configuration file can be in multiple locations and can also include several other config files.

    To edit the nginx configuration file, first try here.

    sudo nano /etc/nginx/nginx.conf

    nginx.conf may also include some other config files, for example:

    sudo nano /etc/nginx/sites-enabled/default

    The config files may also be in the below locations (where example.com is your own domain)

    sudo nano /etc/nginx/sites-enabled/example.com

    If you can’t find Nginx config in the above location, try one of these:

    sudo nano /usr/local/nginx/conf/nginx.conf
    sudo nano /usr/local/etc/nginx/nginx.conf

    If you still can’t find it, try locate.

    locate nginx.conf

    To save file and exit in nano, press CTRL + X, press Y and then press ENTER)

    To check that the Nginx config file is valid after saving.

    sudo nginx -t

    If valid, reload Nginx service.

    sudo service nginx reload

  • @phenomlab none of that exists with me, only the 2 files. For me everything is just a minimal installation. nginx and php8 no more.

    Would you like to take a look at the server yourself?

  • @riekmedia Yes. Let me have a look

  • @phenomlab okay, i send PM

  • @riekmedia Looking at this further, I’m wondering if this setting in NodeBB has any relevance. It was set to 2Mb (2048Kb), so I’ve changed it to 32Mb (32768kb)

    5538887c-9216-4fcb-9f4b-a04fe58e39af-image.png

    Setting has been saved. Can you see if this fixes it ?

  • @phenomlab no the problem is still there

  • @riekmedia I’ve just managed to edit a template on your site (404.tpl), saved, and re-built assets with no issues ? What are you uploading into the file ?

  • @phenomlab I’m trying to edit group / details. Just change a ccs command style there.

    But even if you don’t change anything there and simply click on save, the error occurs

  • @riekmedia said in nodebb-plugin-customize error:

    I’m trying to edit group / details. Just change a ccs command style there.

    Can you let me know which template you’re seeing this on ?

  • @riekmedia I see what you mean - it only seems to be the one template though. I’m not surprised as this file is huge but I can’t see anywhere the setting can be adjusted unless it’s in the plugin itself.

  • @phenomlab I can’t tell you that 🙂 I know the plugin so far only since yesterday through you 🙂

  • Ich habe darüber versucht das cover image von der gruppe selbst anzupassen so wie du es mit dem profil cover gemacht hast, because I couldn’t do that with css

    [MOD-EDIT]: I tried to adapt the cover image of the group itself like you did with the profile cover, because I couldn’t do that with css

    backround-size: auto;
    

    89ae447b-c9fe-4923-b3b1-4be30707ad0e-image.png


Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • 3 Votes
    5 Posts
    499 Views

    @DownPW it’s possible, yes, but you may inadvertently end up targeting other elements using the same class which of course isn’t desired.

    Can you provide a link in DM for me to review?

  • 3 Votes
    11 Posts
    705 Views

    @cagatay no problems

  • 1 Votes
    2 Posts
    609 Views

    @eveh Welcome board 🙂

    The code you are referring to is custom written as no such functionality exists under NodeBB. However, adding the functionality is relatively trivial. Below are the required steps

    Navigate to /admin/appearance/customise#custom-header Add the below code to your header, and save once completed <ol id="mainbanner" class="breadcrumb"><li id="addtext">Your Title Goes Here</li></ol> Navigate to /admin/appearance/customise#custom-js and add the below code, then save $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { // Initialise mainbanner ID, but hide it from view $('#mainbanner').hide(); var pathname = window.location.pathname; if (pathname === "/") { $("#addtext").text("Your Title"); $('#mainbanner').show(); } else {} // If we want to add a title to a sub page, uncomment the below and adjust accordingly //if (pathname === "/yourpath") { //$("#addtext").text("Your Title"); //$('#mainbanner').show(); //} }); }); Navigate to /admin/appearance/customise#custom-css and add the below CSS block .breadcrumb { right: 0; margin-right: auto; text-align: center; background: #0086c4; color: #ffffff; width: 100vw; position: relative; margin-left: -50vw; left: 50%; top: 50px; position: fixed; z-index: 1020; }

    Note, that you will need to adjust your CSS code to suit your own site / requirements.

  • 2 Votes
    6 Posts
    355 Views

    @Sampo2910 no problems. Happy to help. Just remember that this particular method isn’t the best in the sense that it may not get update notifications. The general recommendation here would be to move back to the official npm repo as soon as the GitHub version has been merged.

    For the meantime, it’ll work fine though.

  • 2 Votes
    10 Posts
    858 Views

    @DownPW

    We just have to change the cycles automatically according to each period ?

    Yes, this is by far the safest

    I think it is possible to achieve the goal, I have already seen this kind of thing on a site without any perf problems.

    It’s certainly possible, but not without issues or impact to performance (in my view)

  • 3 Votes
    6 Posts
    990 Views

    @phenomlab

    haha!!
    You are crazy. In a good way, of course 🙂

    It’s a way of saying you’re awesome !

  • [NODEBB] Stats

    Unsolved Customisation
    20
    2 Votes
    20 Posts
    1k Views

    @phenomlab said in [NODEBB] Stats:

    @jac or I land up fixing it 🙂

    I wouldn’t put it past you 😛

  • NodeBB Design help

    Solved Customisation
    8
    2 Votes
    8 Posts
    828 Views

    @riekmedia I’ve applied some new CSS to your site. Can you reload the page and try again ?

    For the record, this is what I added

    #footer { background: #2d343e; border-top: 4px solid #2d343e; font-size: 0.9em; margin-top: 70px; padding: 80px 0 0; position: relative; clear: both; bottom: 0; left: 0; right: 0; z-index: 1000; margin-left: -15px; margin-right: -338px; }

    The /categories page seems a bit messed up, so looking at that currently

    EDIT - issued some override CSS in the CATEGORIES widget

    <!--- CSS fix for overspill on /categories page - DO NOT DELETE --> <style> #footer { margin-right: -45px; } </style>

    That should resolve the /categories issue.