# Pagetext message



## Crackle (10 Feb 2010)

Is there a reason why older threads and posts have been replaced with the word Pagetext. Seems to happen on any threads started before May 2008?


----------



## Shaun (10 Feb 2010)

Yes ... it was caused by the recent database crash and applies to the earliest posts from the very beginnings of CC.

I've got a backup of the post data but as there are around 13,900 affected posts it's going to take me a while to manually pull the contents from the backup and add them back in to the main database (_there's no way to automate the process unfortunately!_).

I plan to do this in batches as time allows, so over time they will be slowly drip-fed back into place.

No rest for the wicked eh ... 

Cheers,
Shaun


----------



## Crackle (10 Feb 2010)

Oooh, a grim task, I sympathise. Well done Shaun, not only aware of it but on the job too


----------



## andyfromotley (15 Feb 2010)

oh shaun no


----------



## Shaun (15 Feb 2010)

Don't worry, it'll all in hand; I'm installing Apache, MySQL, PHP, and PHPMyAdmin on my laptop, restoring from the 1GB SQL backup file to recover the post table from the vBulletin database, whittling it down to the 13,900 affected records, writing the ID and Content fields to a new temporary table, dumping the field data to and SQL backup file, importing the contents into Excel, doing a find and replace to set-up the insert statements, exporting them to a CVS file, doing a find and replace to tidy up the statements, then running them through PHPMyAdmin to re-insert them back into the master table.


----------



## TheDoctor (16 Feb 2010)

Well, when you put it like that it's all so obvious.
.
.
.
*baffled*


----------



## Crackle (16 Feb 2010)

Admin said:


> Don't worry, it'll all in hand; I'm installing Apache, MySQL, PHP, and PHPMyAdmin on my laptop, restoring from the 1GB SQL backup file to recover the post table from the vBulletin database, whittling it down to the 13,900 affected records, writing the ID and Content fields to a new temporary table, dumping the field data to and SQL backup file, importing the contents into Excel, doing a find and replace to set-up the insert statements, exporting them to a CVS file, doing a find and replace to tidy up the statements, then running them through PHPMyAdmin to re-insert them back into the master table.




Yeah, I thought so......<cough>


----------



## dellzeqq (16 Feb 2010)

Admin said:


> Don't worry, it'll all in hand; I'm installing Apache, MySQL, PHP, and PHPMyAdmin on my laptop, restoring from the 1GB SQL backup file to recover the post table from the vBulletin database, whittling it down to the 13,900 affected records, writing the ID and Content fields to a new temporary table, dumping the field data to and SQL backup file, importing the contents into Excel, doing a find and replace to set-up the insert statements, exporting them to a CVS file, doing a find and replace to tidy up the statements, then running them through PHPMyAdmin to re-insert them back into the master table.


wow! Beats *'get your coat, you've pulled'*.


----------



## Shaun (16 Feb 2010)

My inner geek occasionally wins out!!! 

Oh, and don't tell anyone, but it's much worse than I thought ... 

"I may be gone for some time" ....


----------



## Shaun (17 Feb 2010)

Job done!!

A bit of MySQL trickery has saved the day.

Cheers,
Shaun


----------



## Crackle (17 Feb 2010)

Thanks Shaun, all back to normal.


----------



## Crackle (18 Feb 2010)

I spoke to soon. Going back from around this date, many threads contain the same text.

https://www.cyclechat.net/


----------



## TheDoctor (18 Feb 2010)

Another affected thread here http://www.cyclechat.co.uk/forums/showthread.php?t=697


----------



## Shaun (19 Feb 2010)

Ah, it looks like a few of them got mixed up during the replacement query.

Should be able to fix it, but I have a busy weekend ahead so might not get to it until sometime early next week.

I'll post here once sorted.

Cheers,
Shaun


----------



## TheDoctor (19 Feb 2010)

No great rush - don't feel too guilty if it's lunchtime on Monday before it's finished.


----------



## Shaun (20 Feb 2010)

Okay, should be all done now.

The duplicate posts have been replaced with the original post data and the _pagetext_ posts were cached entries that have now been re-cached.

If you find any other anomalies though, please let me know.

Cheers,
Shaun


----------

