Comment rot solved
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.
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.
Thank you so much! *hugs*
I'm sure that's a huge headache relief for you.
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.
Also, mass icon uploader? AWESOME.
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.
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.
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.
Yay! This is a huge relief because one of my RP journals had really been hit hard by the comment rot issue.
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.