Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 11-27-2014, 06:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we get a link to the feed and also what do you have set for the RSS template?
Reply With Quote
  #12  
Old 11-27-2014, 06:44 PM
John Diver John Diver is offline
 
Join Date: Nov 2003
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thanks
Reply With Quote
  #13  
Old 11-27-2014, 06:58 PM
vBNinja's Avatar
vBNinja vBNinja is offline
 
Join Date: May 2011
Location: USA
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Diver View Post
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
Reply With Quote
  #14  
Old 11-27-2014, 07:25 PM
John Diver John Diver is offline
 
Join Date: Nov 2003
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Showing rows 0 - 29 (2957 total, Query took 0.0164 sec)
So thats 2957 empty posts or am I getting something wrong?
Reply With Quote
  #15  
Old 11-27-2014, 08:11 PM
vBNinja's Avatar
vBNinja vBNinja is offline
 
Join Date: May 2011
Location: USA
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Diver View Post
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
Reply With Quote
Благодарность от:
ozzy47
  #16  
Old 12-02-2014, 12:31 PM
John Diver John Diver is offline
 
Join Date: Nov 2003
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 12-02-2014, 01:27 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 12-02-2014, 03:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 12-02-2014, 07:22 PM
John Diver John Diver is offline
 
Join Date: Nov 2003
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #20  
Old 12-02-2014, 07:34 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Diver View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06966 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete