|
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"
|
|
|
|
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"
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 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.
|
|
|
|
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"
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 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.
|
|
|
|
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"
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 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 HTMLUPDATE 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 supportedUPDATE 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).
|
|
|
|
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) 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"
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 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.
|
|
|
|
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"
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 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.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.
|
|
|
|
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"
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
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.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"
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 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.
|
|
|
|
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"
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Stovebolt),
813
guests, and
159
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|