vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Search for empty posts and delete (https://vborg.vbsupport.ru/showthread.php?t=315639)

Lynne 11-27-2014 06:06 PM

Can we get a link to the feed and also what do you have set for the RSS template?

John Diver 11-27-2014 06:44 PM

Hey Lynee, is there a query I can run to find posts with a blank body (No characters for the message)?

Thanks

vBNinja 11-27-2014 06:58 PM

Quote:

Originally Posted by John Diver (Post 2524525)
Hey Lynee, is there a query I can run to find posts with a blank body (No characters for the message)?

Thanks

PHP Code:

SELECT postid FROM post WHERE pagetext ''

I don't see why you would have blank posts though

John Diver 11-27-2014 07:25 PM

Quote:

Showing rows 0 - 29 (2957 total, Query took 0.0164 sec)
So thats 2957 empty posts or am I getting something wrong?

vBNinja 11-27-2014 08:11 PM

Quote:

Originally Posted by John Diver (Post 2524530)
So thats 2957 empty posts or am I getting something wrong?

Yes it means there are 2957 empty posts... No clue why you have that lol

John Diver 12-02-2014 12:31 PM

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 :)

kh99 12-02-2014 01:27 PM

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.

Lynne 12-02-2014 03:58 PM

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.

John Diver 12-02-2014 07:22 PM

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?

kh99 12-02-2014 07:34 PM

Quote:

Originally Posted by John Diver (Post 2525292)
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?

Oh, no, if you were seeing errors about it then probably not. I based my comment on the code in the thread/post data manager. If the post is being made as "automated" then it skips some checks (like minimum characters). There are some things done to the post body after that check, like censorng and removing unprintable characters, so I imagine that it's possible that a post could turn out blank anyway, but maybe there's some other explanation in your case.

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 08:06 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02801 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete