Forum post breaking theme

Technical Support
  • Hello,

    As anyone else experienced the {post.content} parsing outside of its designated position in the html structure?

    I've checked other default themes and its the same on these too.

    This is the issue: https://saesrpg.uk/topic/602/arms-assassins/9

    If you inspect the html, you can see that the images are parsed outside the content div for some reason and I can't pin it down. I've noticed this happen when people also copy/paste an bulletpoint in a post rather than use an asterisk.

    Other posts/topics have images in fine and work normally. (as you can see in other topics)

    Template code where the content is looks like the following:

    <div class="content" component="post/content" itemprop="text">
    	{posts.content}
    </div>
    

    However inspecting the html code shows that this isn’t the case for this one post/topic...

    Can you recommend anything for me to check this out (in the parser for example)?

    P.S. HTML posting is disabled.

  • Find the post id and then look at the raw content of that post with db.objects.findOne({_key: "post:<id_of_post>"}).content Maybe post that content here as well.

  • @baris Thank you very much, I think I've isolated it due to bad placement of the spoiler tag by someone.

    I will switch out the plugin to a more maintained one too...

  • You can try this, create a file called query.js in your nodebb root folder with the below content.

    var content = `
        // paste fixed post content here
    `;
    
    db.objects.update({_key: "post:4090"}, {$set: {content: content}});
    

    Then execute it from the CLI with mongo localhost:27010/<replace_with_your_db_name> query.js

    This should replace the content of that post, keep in mind post content is cached so you will have to restart your nodebb after doing this to see the updated content.

  • Thanks @baris

    I managed to fix it by disabling the plugin, which let me then edit the post and I've also replaced the plugin with one that's actually maintained.

    Thanks again for the help in locating this error.


Suggested Topics


  • 0 Votes
    7 Posts
    550 Views

    I had the same problem now when updating again. The solution was to enter the docker container:

    docker exec -it ff747e7168b7 /bin/sh

    then when building it printed some errors:

    /opt/nodebb # ./nodebb build started 2021-11-11T11:56:22.384Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer.js (Ignoring) 2021-11-11T11:56:22.387Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/autocomplete.js (Ignoring) 2021-11-11T11:56:22.389Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/categoryList.js (Ignoring) 2021-11-11T11:56:22.389Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/controls.js (Ignoring) 2021-11-11T11:56:22.390Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/drafts.js (Ignoring) 2021-11-11T11:56:22.390Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/formatting.js (Ignoring) 2021-11-11T11:56:22.391Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/preview.js (Ignoring) 2021-11-11T11:56:22.391Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/resize.js (Ignoring) 2021-11-11T11:56:22.392Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/scheduler.js (Ignoring) 2021-11-11T11:56:22.392Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/tags.js (Ignoring) 2021-11-11T11:56:22.392Z [4567/320] - warn: [plugins] File not found: /opt/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/composer/uploads.js (Ignoring) 2021-11-11T11:56:22.394Z [4567/320] - info: [build] Building in parallel mode 2021-11-11T11:56:22.395Z [4567/320] - info: [build] plugin static dirs build started 2021-11-11T11:56:22.398Z [4567/320] - info: [build] requirejs modules build started 2021-11-11T11:56:22.399Z [4567/320] - info: [build] client js bundle build started 2021-11-11T11:56:22.435Z [4567/320] - info: [build] admin js bundle build started 2021-11-11T11:56:22.435Z [4567/320] - info: [build] client side styles build started 2021-11-11T11:56:22.436Z [4567/320] - info: [build] admin control panel styles build started 2021-11-11T11:56:22.437Z [4567/320] - info: [build] templates build started 2021-11-11T11:56:22.437Z [4567/320] - info: [build] languages build started 2021-11-11T11:56:22.889Z [4567/320] - warn: [meta/css] File not found! nodebb-plugin-composer-default/static/less/composer.less 2021-11-11T11:56:22.994Z [4567/320] - warn: [meta/css] File not found! nodebb-plugin-composer-default/static/less/composer.less 2021-11-11T11:56:25.310Z [4567/320] - info: [build] plugin static dirs build completed in 2.915sec 2021-11-11T11:56:38.072Z [4567/320] - info: [build] client js bundle build completed in 15.673sec 2021-11-11T11:56:38.073Z [4567/320] - info: [build] admin js bundle build completed in 15.638sec 2021-11-11T11:56:38.081Z [4567/320] - info: [build] client side styles build completed in 15.646sec 2021-11-11T11:56:42.625Z [4567/320] - info: [build] admin control panel styles build completed in 20.189sec 2021-11-11T11:56:42.787Z [4567/320] - info: [build] languages build completed in 20.35sec 2021-11-11T11:56:43.191Z [4567/320] - info: [build] templates build completed in 20.754sec 2021-11-11T11:56:47.327Z [4567/320] - info: [build] requirejs modules build completed in 24.929sec 2021-11-11T11:56:47.329Z [4567/320] - info: [build] Asset compilation successful. Completed in 24.933sec.

    Then I removed all plugins, enabled only quill, rebuild (no more missing file warnings) and restarted the docker container.

  • 0 Votes
    4 Posts
    794 Views

    @JJSagan Yes, that is normal, just an informative echo to indicate that the process has started.

  • 0 Votes
    4 Posts
    2k Views

    Check your Nginx settings. One of my systems broke on upgrade because of that.

    New install leaves me with session mismatch + invalid csrf

    @Pramvir-Rathee here is my current Nginx config for the site. server { client_max_body_size 40M; listen 443 ssl; server_name community.bundystl.c...

    favicon

    NodeBB Community (community.nodebb.org)

  • 0 Votes
    3 Posts
    1k Views

    @rnovino If this happens, then your NodeBB is crashing repeatedly.