XF 2.0 BBCode not working in CODE tag and Tab becomes spaces?

PJK

Active member
I upgraded from XF 1.5 to 2 a few months back. Recently got this message and trying to figure out the best way to solve it, any advice would be much appreciated, thanks!
With one of the last site upgrades the BBcode formatting for bold and colour is broken when used within CODE tags. I seem to recall this happened a while back, with one of the previous upgrades. I use multiple BBcode tags in my reconstruction statistics and at the moment all of them are broken.

Here is an example of what I mean: https://www.speedsolving.com/forum/threads/max-park-18-42-4x4-single.69296/#post-1290756

Another thing is TAB spacing is being automatically replaced with multiple spaces, so the "forced columns" from using TAB spacing is also broken.

I've removed the additional BBcode in this post, but this will show the TAB spacing issue: https://www.speedsolving.com/forum/threads/the-reconstruction-thread.29123/post-1308324

Is it possible make a change to salvage this feature? I'd hate to have all my past work look so ugly.
 
BB code was never supported within code tags unless you tagged them as "rich" using [code=rich]. If that worked before, I have to assume you had an add-on that changed that.

Tab to space conversion is, IIRC, something that we have done all the way back in XF 1.x as well, and it's roughly necessary for the rich text editor. I believe disabling that (using the icon on the editor) will skip this conversion.
 
BB code was never supported within code tags unless you tagged them as "rich" using [code=rich]. If that worked before, I have to assume you had an add-on that changed that.

Tab to space conversion is, IIRC, something that we have done all the way back in XF 1.x as well, and it's roughly necessary for the rich text editor. I believe disabling that (using the icon on the editor) will skip this conversion.
Ah, I was prob using an addon then on XF 1.x. Considering I'm on 2 now, I want to fix these issues for this user, who has made hundreds of posts that are now not formatted correctly. Changing code to code=rich does solve the BBcode issue, but the spacing is still messed up.
  1. How can I fix the formatting/spacing issue? Changing to toggle BBcode off and click save doesn't seem to do the trick.
  2. Once 1 is solved, how can I implement this on all his posts? Also, how can I implement code=rich on all his posts? I think I was using an old BBCode editor. Now I see Editor & BB Code Manager is installed on my XF 2.

Thanks.
 
In terms of #1, this needs to be toggled before editing the post(s) in question. The BB code vs rich text choice approach will apply to all editors shown in that browser. If you load the post in the rich text editor, then the conversion has already happened (and the toggle is based on the text shown in the editor).

Out of the box, the only real way to enable code=rich on all of his posts would involve manually editing them to set that value. It is potentially possible with a query on the DB to change [code] to [code=rich] in posts contents for this user, though we're always reticent to recommend this sort of action.
 
  • Like
Reactions: PJK
Toggle it in quick reply and then click the edit button. The choice will stay with you.
In terms of editing these existing posts, how can I resolve the spacing issues? The user has hundreds of posts mis-formatted now that I'm trying to fix. Thanks.
 
If you are trying to fix the posts, unfortunately it really is something that would have to be done by hand.

You may be able to revert the post to a previous version by clicking the "history" link on the edited post, clicking "view" on the latest working revision and choose the revert option. This would lose any content changes since that point though, so that may not be viable.

Worth noting that 2.1 has table support built in. Looking at a couple of the examples given, that might be a solution to new posts, though it depends what the format of the original content is.
 
If you are trying to fix the posts, unfortunately it really is something that would have to be done by hand.

You may be able to revert the post to a previous version by clicking the "history" link on the edited post, clicking "view" on the latest working revision and choose the revert option. This would lose any content changes since that point though, so that may not be viable.

Worth noting that 2.1 has table support built in. Looking at a couple of the examples given, that might be a solution to new posts, though it depends what the format of the original content is.
There are around 500-600 posts this user created, so by hand isn't an option. My main concern is modifying old posts, new posts can be easily fixed. Any other ideas? Would be willing to pay to get this fixed. Thanks.
 
Back
Top Bottom