Current time: 04-24-2014, 10:20 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what happens if posthash in posts table is empty?
03-06-2012, 10:53 AM
Post: #1
Not Solved what happens if posthash in posts table is empty?
what happens if posthash in posts table is empty?
is there any drawback or functionality issue there ?
Find all posts by this user
Quote this message in a reply
03-06-2012, 11:07 AM
Post: #2
Not Solved RE: what happens if posthash in posts table is empty?
See: http://community.mybb.com/thread-33838-p...#pid227016

I haven't looked into it much, but it seems you'll have issues with uploading attachments if the posthash doesn't exist.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-06-2012, 01:19 PM
Post: #3
Not Solved RE: what happens if posthash in posts table is empty?
you might also have issues with quick reply

Visit this user's website Find all posts by this user
Quote this message in a reply
12-28-2012, 09:38 PM (This post was last modified: 12-29-2012 12:36 AM by WebDevandPhoto.)
Post: #4
Not Solved RE: what happens if posthash in posts table is empty?
I'm having this issue, I was using advanced quick reply plugin (which signature stopped working) and disabled it but I doubt that has anything to do with attachments.
Anyway the posthash was blank for 7 attachments and in some cases these 7 attachments will move themselves all to a different post id and thread id....
I fixed the pid and tid in phpMyAdmin but how do I generate posthash for these 7 attachments so this doesn't happen again (the attachments moving posts).
My original post with this problem:
http://community.mybb.com/thread-131741.html

frostschutz provided me a fix for the posthash issue on this post:
http://community.mybb.com/thread-77971-p...#pid954198
(12-28-2012 10:04 PM)frostschutz Wrote:  This should reset ALL posthashes to a random md5 hash for each post and attachment. In phpMyAdmin, execute all three lines in one go.

Code:
SET @salt=CONCAT(RAND(),RAND(),RAND(),RAND());
UPDATE mybb_posts SET posthash=MD5(CONCAT(@salt, '-', pid, '-', uid, '-', @salt));
UPDATE mybb_attachments SET posthash=MD5(CONCAT(@salt, '-', pid, '-', uid, '-', @salt));

It shouldn't cause any problems as long as no one is creating/editing a post with attachments at the time you run this.

It works. Thank you Frostschuz!

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication