![]() |
Search for empty posts and delete
Hey,
I upgraded a forum from 3.8 and I have some RSS feeds setup, some of the feeds are showing blank posts - I would like to know how I can search for any blank posts first so I can check the feed and how I could delete any posts that have a blank message - Some posts have the title but no actual post for some reason. Thanks for any help :) |
Quote:
|
Thanks for the reply.
I have been running these today, its taking quite a while, 260k+ threads - But these were new posts, it was showing the title but no body content. I was hoping to find any that are coming blank so I can work on that feed. Thanks Len |
Quote:
|
Hey Len
I upgraded from 3.8.3 I think it was,, it was 3.8.x anyway. I copied the database to a new db by SSH and just ran through the upgrade script |
Quote:
|
Yeah the site was live, I meant I did a copy as a test site so I wasn't working with the live db
|
Did you check the actual RSS feed itself to see if it was feeding you blank posts?
|
Hey Lynne, yeah I checked it and the feed is working fine
|
Quote:
|
Can we get a link to the feed and also what do you have set for the RSS template?
|
Hey Lynee, is there a query I can run to find posts with a blank body (No characters for the message)?
Thanks |
Quote:
PHP Code:
|
Quote:
|
Quote:
|
Weird... Could anyone help with the query to remove the blank posts, I wonder if they were blank or if the content was lost..
Thanks again :) |
It's a pretty simple query to DELETE FROM post WHERE pagetext = '', but I don't know if that's a good idea. When you delete a post in vbulletin it also handles deleteing anything else that needs to be deleted (like the thread if you delete the only post), and keeps counters up to date. I think it would be a better idea to use a php script to query for the post ids, then call the vbulletin delete_post() function for each one.
|
If you are going to run a query to do this, I would STRONGLY suggest doing it on a test site first. If you don't write a script like Kevin suggested, then make sure your run Rebuild Thread Information, Rebuild Forum Information, Rebuild Post Count, Remove Orphan Threads, and Remove Orphan Posts all from the Maintenance > General Update Tools screen. Then click on some threads/posts that you know were empty and see if everything is working correctly. And then, and ONLY then, should you do a database backup of your live site and do the same thing there.
|
Thanks for the replies.
Bit of a mission to get this fixed, I will try doing a fresh test upgrade again and see if the same happens. Kevin, you posted before that the RSS poster would bypass vBulletin stopping a post if it was blank, but if it was run through the admincp an error would show that the subject of body is blank, does that mean the script is still able to bypass that and post a blank message? |
Quote:
If you have a feed that's producing blank posts then it might help track down that error. |
All times are GMT. The time now is 02:07 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|