Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2006
Posts: 15
D
stranger
stranger
D Offline
Joined: Oct 2006
Posts: 15
I recently upgraded my boards from 7.2 to 7.5.4.2, and then ran the rebuild posts option. This worked fine for the most part, but really old posts (the board started on WWWThreads 3.5) have a lot of exposed HTML tags. If I edit them and change it to allow HTML and UBB code, it fixes the issue. However, it would be slightly time consuming to do that to 300k posts :-)

Digging into the database, I find POST_BODY has lots of stuff like this:
Code
</font><blockquote><font class=&quo...
And then POST_DEFAULT_BODY has this:
Code
</font><blockquote><font class="

If I edit a post and set the type to both ubb and HTML, POST_BODY ends up matching POST_DEFAULT_BODY with proper HTML.

Whats the best way to clean this up on a mass scale?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Wow, you're an old timer wink

One thing that might work is if you have some sort of an idea of the largest POST_ID that has this problem. With that, you could do a mass update and set POST_BODY to be the same as POST_DEFAULT_BODY for all of those posts. So, say the problem stops at POST_ID 125367, you could run this query:

SQL Query
update ubbt_POSTS set POST_BODY = POST_DEFAULT_BODY where POST_ID > 125368

Joined: Oct 2006
Posts: 15
D
stranger
stranger
D Offline
Joined: Oct 2006
Posts: 15
It should be easy enough to find the ID. Glad to see it's an easy fix, I wasn't quite sure about mass copying POST_DEFAULT_BODY into POST_BODY, so I wanted to check first.

Thanks for the quick response, support like this is why I've stuck to the software after all these years :-)

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
It will take awhile for the query to run, but the index is on POST_DEFAULT_BODY so it won't have to do any reindexing, so that will help.

Joined: Oct 2006
Posts: 15
D
stranger
stranger
D Offline
Joined: Oct 2006
Posts: 15
Ok, that kinda did it, the HTML disappeared. Now I have posts with exposed UBB tags and all the breaks between paragraphs went poof. As a followup, I tried this:

Code
update ubbt_POSTS set POST_MARKUP_TYPE = "both" where POST_ID < 304806

That didn't seem to change much.

I do have a backup prior to the rebuild of the posts. Does it renumber posts at all, or should I be safe to just restore the posts below X ID?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
The rebuild doesn't renumber posts at all, so you could just restore the posts below that certain id.

Sorry about that, I had totally forgot about how it would have the raw ubb tags, was just thinking about the html.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
0 members (), 407 guests, and 105 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)