XF 1.4 BBCode Closing itself - creating problems

Blt950

Member
Hello,

I got some BBCodes which are for example [titlebar]A title here[/titlebar], also tables, infoboxes and so on. But for some reason, the BBCode editor sometimes decides to close the tags itself (like it doesn't find the closing tag, even though it exists), which then creates a lot of trouble.

Because once I save, it kicks in and suddenly closes the tag in places I never wanted it to close, messing up the whole code even more.

Is there something wrong in the custom BBCode itself, or any fix for this? It's getting really annoying when writing long guide threads on my forums.
 
Hello,

I got some BBCodes which are for example [titlebar]A title here[/titlebar], also tables, infoboxes and so on. But for some reason, the BBCode editor sometimes decides to close the tags itself (like it doesn't find the closing tag, even though it exists), which then creates a lot of trouble.

Because once I save, it kicks in and suddenly closes the tag in places I never wanted it to close, messing up the whole code even more.

Is there something wrong in the custom BBCode itself, or any fix for this? It's getting really annoying when writing long guide threads on my forums.
In this case it may make sense for you to take a screen shot of both tabs ( Basic Information | Advanced Options ) so that anyone attempting to help you can see what you have for a bbcode and then possibly if needed the case scenario where things break (an example of the post content which breaks for you, wrapped between [plain] tags) so that someone can repeat what is happening for you.
 
If I had to guess, there are actually BB code tags that are ending up mis-nested. This gets fixed automatically, but it involves closing and reopening tags. You can see some odd things happen when this involves block-level tags (think quote/code, not b/i/u).

If you have a post where it's happening, disable the rich text editor in your options, then edit the post. If possible, paste the whole thing here (in plain/code tags) or attach it as a text file. We can see if there's mis-nesting. If there is, the solution would just be to fix the nesting.
 
Uploaded screenshots of the [infobox] tag I often use and is the one which messes up mostly.
Last screenshot shows how it suddenly decides to open/close the tag again, and sometimes it's even more than just once, it's like up to 3 times, and at the end the infobox is not closed at all....

I've tried to disable RTE and edit it - to save it, but it actually does the exact same thing then as well.
 

Attachments

  • 1.webp
    1.webp
    47.3 KB · Views: 14
  • 2.webp
    2.webp
    53.4 KB · Views: 16
  • 3.webp
    3.webp
    82.9 KB · Views: 16
The purpose of disabling the RTE wasn't to save it -- it was to see the actual code involved. (Note that you need to disable the RTE before editing, not flip to the non-RTE mode when editing.)

That said, there appears to be a font change surrounding the tag close and open in the last screenshot, so I'm pretty sure that is the mis-nesting issue. You can look at using the remove formatting button on certain areas to clean that up.
 
There is also the possibility that when the bbcode was first entered into the post the [infobox] tag wasn't closed...[infobox] blah blah blah[infobox] (note the missing / in the closing tag) and I have seen that break post content in a multitude of ways...all of which I would expect no different than when not closing a standard html tag.

I just tested doing what I just explained and it does indeed produce something very similar though I can't know for sure without seeing the plaintext example and being able to test that myself.
 
Top Bottom