InsaneJournal Announcements

Comment rot solved

InsaneJournal Announcements

Comment rot solved

Previous Entry Add to Memories Tell a Friend Next Entry
I found the cause of comment rot. There was an old legacy setting that I didn't know what it did. It was among the last of the things to trace out in the code. I traced it out and found the offending code that was deleting comments and entry properties (status, userpic, etc) and removed it. Please let me know in THIS post if any NEW comment rot occurs after this post.

This has been a very very long and trying road and I want to thank all of you who have stuck it out here in spite of this major bug.


sub new_entry_cleanup_hack {
my ($u, $jitemid) = @_;

# sanitize input
$jitemid += 0;
return unless $jitemid;
my $ownerid = LJ::want_userid($u);
return unless $ownerid;

# delete logprops
$u->do("DELETE FROM logprop2 WHERE journalid=$ownerid AND jitemid=$jitemid");

# delete comments
my $ids = LJ::Talk::get_talk_data($u, 'L', $jitemid);
return unless ref $ids eq 'HASH' && %$ids;
my $list = join ',', map { $_+0 } keys %$ids;
$u->do("DELETE FROM talk2 WHERE journalid=$ownerid AND jtalkid IN ($list)");
$u->do("DELETE FROM talktext2 WHERE journalid=$ownerid AND jtalkid IN ($list)");
$u->do("DELETE FROM talkprop2 WHERE journalid=$ownerid AND jtalkid IN ($list)");
}
</pre>



Edit: After looking at the code even more closely I am sure that this was the cause, I think we can call comment rot a closed issue. Now to getting to writing a mass icon uploader.
  • YAY. CONGRATS, SQUEAKY! Awesome job, thank you!
  • So this is what ate my mood and music :(
  • Squeaky, you are awesome. Thank you!
  • As someone who lost several hundred of comments to that thing I can't tell you how happy I am that it is finally resolved now!

    Thank you so much! *hugs*
  • I ♥ j00
  • Bravo J! Well done!

    I'm sure that's a huge headache relief for you.
  • yay! i hope that's it! :]
  • Squeaky, as an off topic comment -- I have mentioned this before and you rejected the idea, but I am going to ask again given how important these announcements are -- can you please enable the s1 comment style on the announcements journal?

    It is really difficult to read your default s2 comment page and it doesn't always load fully. I realise that adding ?style=mine fixes the problem, but having to do so every time I want to read an announcement is tedious and frustrating. Thank you.
  • o m g :D :D :D :D
  • Thank you SO much for everything you've done, squeaky. I never had an issue with this, but just the thought that it's fixed and should never happen is a wonderful comfort.

    Also, mass icon uploader? AWESOME.
  • Bloody awesome! Cookies and more to Squeaky!
  • This is great news! Thank you!
  • Oooh, I hope that's it! I had some of my icons disappear and flailed a lot about it but accepted it as a fair tradeoff for how awesome the rest of the site is. Without anymore comment rot in the future, iJay's three times cooler than it already is!

    Also, I hate bug chasing. Loathe it. Congrats on having the patience to wade through someone else's code and locate it. Your userbase loves you for this level of dedication.
  • Yay Squeaky! That's such awesome news! Thank you for all the work you put in to solving the problem!
  • Yay!

    Related to the multi-icon uploading, I would love to have a select/delete all button for those occasions when I want to completely clean out a journal's icons and start uploading from scratch. Clicking "delete" 100 times is a bit tedious.
  • Thank you so much for fixing this.

    Is there a way to clear out notifications? On another journal I have 1800+ it says and I can't delete them because it won't load.
  • Squeaky - you are our hero!
  • Yay! This is a huge relief because one of my RP journals had really been hit hard by the comment rot issue.

  • CongratsCongratsCONGRATS!!!!!

    I had to do a bit of computer coding to get my math major and I HATED debugging like, six lines of code. I can't imagine how hard that was.

    Also, massive icon uploader? I would be SO happy. I haven't uploaded all of my icons (even though I have 5000 spots. >.>) because it's a bit of a pain to do some times. That sounds really, really awesome.
  • I keep reading and rereading this code and trying to figure out why the eff it was there in the first place. Any ideas? AM DESPERATELY CURIOUS D:
  • Oh my god, this is FABULOUS. Thank you for keeping at it! Thank you for working so hard! Thank you for even giving a shit at all! (I know there are some people that have bitched you out over site stuff, but I'm one of those folks who still firmly remembers what it was like at GJ, and by all standards you're pretty fucking rad for a random guy volunteering to do this out of his own free time and goodwill.)
  • You're kind of a big deal in my book right now. <3
  • OMG yay, thank you!!!!
  • Wunderbar! I think I only lost one comment, but still. I'm glad you found the bug. You do amazing work, and I'm glad to count myself as part of the IJ community.
  • Congrats, dude!
Powered by InsaneJournal