Previous Thread
Next Thread
Print Thread
Hop To
#259326 02/24/2017 1:48 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
ok, at some point I did a bad upgade, and many of my old posts have lost all formatting, and are displaying HTML.

if I click "edit" on the individual post, and enable HTML and save it, it's back to normal.

if I enable HTML for users and rebuild all posts, will that fix them all?

Last edited by Bad Frog; 02/24/2017 2:22 PM.

"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259351 02/24/2017 3:26 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
well, I answered that part myself.
didn't work.


so is there a way to get the old posts corrected without having to do each one individually?



"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259353 02/24/2017 3:36 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Did you run the Rebuild Posts and Rebuild Threads utilities after your upgrade? It'll take a good long while, but it should fix parsing issues/new bbcode in old posts. This would also work if you updated the db to change the post type and needed posts to be rebuilt accordingly.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bad Frog #259355 02/24/2017 3:44 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
I have run a full rebuild several times, it doesn't touch the old posts..

when you view them, they are still showing HTML.


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259359 02/24/2017 4:05 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Unfortunately it appears that you have modified your database directly, so there are all sorts of issues that can arise from doing advanced actions directly on the MySQL tables.

You'll need to restore from the backup you created (you should always create a backup before any changes, and it was stressed in the other thread here), or you'll have to accept that your posts are all HTML now and update the database to not parse bbcode in those posts and set your edit post timers to not allow editing posts prior to your MySQL adventure this morning.

Again, I cannot stress the importance of creating a backup before ever making database adjustments.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bad Frog #259363 02/24/2017 4:15 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
these issues existed prior to any database tomfoolery


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259369 02/24/2017 4:40 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
The only way that your posts_default_body could get overwritten with the posts_body (converted to HTML) is if you ran the following chunk of code:
WARNING, do NOT execute the below code, it will make all of your posts HTML
Code
UPDATE ubbt_POSTS
SET POST_DEFAULT_BODY = replace(POST_BODY,'http://EXAMPLE.com','https://EXAMPLE.com')
WARNING, the above MySQL Query is purposfully incorrect as an example, do not EVER execute the above query.

While attempting to run:
WARNING, managing the UBB.threads database is not only not recommended, it is not supported
Code
UPDATE ubbt_POSTS
SET POST_DEFAULT_BODY = replace(POST_DEFAULT_BODY,'http://EXAMPLE.com','https://EXAMPLE.com')

WARNING, if you are prepared to manage your database directly, despite warnings, please ensure that you create a backup before executing any queries.


You SHOULD be able to just use the Active Text (text replace) feature in the control panel to change data coming from the database to the browser (such as URLs, linking to affiliate products, etc).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bad Frog #259373 02/24/2017 4:51 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
it''s only really old posts, from the first couple of years I had the site
when I did my upgrades to new versions of UBB, I didn't read the directions completely, and installed the upgrade to a new follder

this is an example,t this post is from 2000. this is exactly how it appears (except it wordwraps)
Code
In the latest issue of <A HREF="http://www.maximumlinux.com/" TARGET=_blank>Maximum Linux</A> magazine, they went through the setup of a mobile MP3 platform.<P>Their system consisted of a 1U rackmount case with a single-board P-133 computer and a beefy harddrive, powered with a 12-volt DC power supply.<P>Their system was designed to be stuck in the trunk (perhaps bolted to the top, under the package tray), using an FM modulator to get the music out to your deck.<P>I though this would be quite the projec for vanning, as we have much more space available than your average car, although I was thinking about possible improvements.<P>Perhaps the first thing would be to scrap the rackmount case and put in a <A HREF="http://pc104.com" TARGET=_blank>PC-104</A> form factor instead, as there are alot of PC-104 compatible components available, and it's small (4"x4"). <A HREF="http://www.aaeon.com/html/pcmp50.htm" TARGET=_blank>(PC-104 vehicle power supply)</A><P>Maybe I'll flip through the <A HREF="http://www.crutchfield.com" TARGET=_blank>Crutchfield</A> catalog, see if I can't find a head unit with audio inputs (don't really want to go with an FM modulator), but this looks like a dandy project.<P>
if I click edit, enable HTML and save it, it looks correct.

my sql queries this morning did exactly as they were intended, and only affected links for vanning.com, these screwed up posts were already like that.


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259374 02/24/2017 4:55 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
The safest route, if those posts really matter still, would be to edit them through UBB.threads when possible.

You could use PHPMyAdmin to build a list of posts (post_default_body cell) that have HTML in them (search for </a>), but I'd still advise against editing them through anything but UBB.threads.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bad Frog #259375 02/24/2017 4:57 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
yeah, I have been doing them manually when I see one..
they are old and not really important or active, but I like to have things working.

I was just hoping there was an automated way to convert the posts.


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259376 02/24/2017 5:10 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I'm not saying this will work, since I don't allow HTML posting to attempt to test, but:
WARNING, if you choose to modify your database directly, it is completely unsupported. Please create a backup before executing any query as if something happens this backup is your ONLY resource of recovery.
Code
UPDATE `ubbt_POSTS`
SET `POST_MARKUP_TYPE` = "html"
WHERE `POST_DEFAULT_BODY` LIKE "%</a>%"

Basically it's looking in POST_DEFAULT_BODY for the </a> HTML tag, and if it's found it switches the post type to HTML. You WILL need to run the post content rebuilder.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bad Frog #259377 02/24/2017 5:14 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1

I'll give that a shot later and let you know how it worked.

thanks for that info!


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Gizmo #259381 02/24/2017 5:34 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
Originally Posted by Gizmo
I'm not saying this will work, since I don't allow HTML posting to attempt to test, but:
WARNING, if you choose to modify your database directly, it is completely unsupported. Please create a backup before executing any query as if something happens this backup is your ONLY resource of recovery.
Code
UPDATE `ubbt_POSTS`
SET `POST_MARKUP_TYPE` = "html"
WHERE `POST_DEFAULT_BODY` LIKE "%</a>%"

Basically it's looking in POST_DEFAULT_BODY for the </a> HTML tag, and if it's found it switches the post type to HTML. You WILL need to run the post content rebuilder.

the only issue I foresee with this, is posts where someone has posted html examples in a code box

I have 840 posts that have have that match that query


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Bad Frog #259383 02/24/2017 5:39 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I'm not sure how well "both" would work (both bbcode and html), there isn't many things you can match with that would be common to be able to automate the process... I suppose that you could add in a requirement that posts be older than a specific timeframe.

Like I said, if the content is old and isn't relevant then you might just save yourself the time.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Bad Frog #259390 02/24/2017 6:48 PM
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
so I had to run this query three different ways.. with </a>, <BR> and <P>

that seems to be getting them, and they are all looking ok so far.


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (DennyP, 1 invisible), 972 guests, and 155 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)