Forum post breaking theme


  • Gamers

    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.


  • Gamers

    @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.


  • Gamers

    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.


Log in to reply
 

Suggested Topics

  • 1
  • 9
  • 6
  • 10
  • 4
| |