Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Bug in comment ratings for archived comments. Bugs
By haflinger , Section Code []
Posted on Fri Aug 08, 2003 at 12:00:00 PM PST
Some comments that have just been archived still have links from the user's comment ratings page. However, because the comments are now in the archive, they show up as blank comments.

I'm a mass-rater over on k5. I rate a lot of comments. I occasionally check my comment rating history to see how many. The other day, I did this, and I noticed that the last few pages looked like this:
5431) [], by , Rated: 3
Posted on
Rated on 08/12/2002 02:56:30 PM EST

5432) [], by , Rated: 3
Posted on
Rated on 08/04/2002 07:30:36 AM EST

5433) [], by , Rated: 3
Posted on
Rated on 08/04/2002 07:30:36 AM EST

5434) [], by , Rated: 4
Posted on
Rated on 08/04/2002 07:30:36 AM EST

5435) [], by , Rated: 0
Posted on
Rated on 08/04/2002 07:30:35 AM EST

5436) [], by , Rated: 3
Posted on
Rated on 08/04/2002 07:30:35 AM EST

5437) [], by , Rated: 0
Posted on
Rated on 08/04/2002 07:30:35 AM EST

5438) [], by , Rated: 4
Posted on
Rated on 08/04/2002 07:30:35 AM EST

and so on. I suspect that these broken links with no text in the anchor (which incidentally link to comments such as http://www.kuro5hin.org/comments/1027284262_XGgmvHbX/184#184 which is not a real comment) originally pointed to comments which have just been archived.

Incidentally, non-trusted users just get these comments listed as hidden comments, which is somewhat deceptive.

It'd be better if these comments just didn't get listed, at all.

< WiseNomad.com Launched - Site for backpackers & world travelers | Slash breaks Scoop, Scoop breaks Slash >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Related Links
· Kuro5hin
·
· [2]
· 3
· [3]
· 3 [2]
· [4]
· 3 [3]
· [5]
· 4
· [6]
· 0
· [7]
· 3 [4]
· [8]
· 0 [2]
· [9]
· 4 [2]
· More on Bugs
· Also by haflinger

Story Views
  20 Scoop users have viewed this story.

Display: Sort:
Bug in comment ratings for archived comments. | 4 comments (4 topical, 0 hidden)
Yes (none / 0) (#1)
by hulver on Mon Aug 11, 2003 at 03:51:47 AM PST

I think it's something to do with rustys new comment archiving script and polls.

Previously, comments attachted to polls and hidden sids were not archived.

It now looks like they're being archived. However, the bit of code that looks at where to get the comment from (archive or not) checks the story database.

Polls and hidden sids are not in the story database. So it gets confused.

What you are seeing is your rating against comments that are in the archive. However, scoop isn't displaying the comment because it's still looking in the main database.

Interesting.


-- HuSi - It's what scoop's for.



Patch (none / 0) (#2)
by hulver on Mon Aug 11, 2003 at 03:55:09 AM PST

Index: Stories.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Stories.pm,v
retrieving revision 1.41
diff -c -r1.41 Stories.pm
*** Stories.pm  23 Apr 2003 20:36:26 -0000      1.41
--- Stories.pm  11 Aug 2003 10:53:44 -0000
***************
*** 414,419 ****
--- 414,431 ----
                $stat = $sth->fetchrow() unless !$rv;
                #warn "sid $sid not in archive\n" if !$stat;
                $sth->finish();
+               if (!stat) {
+                       #warn "sid $sid not in archive story table. Checking comments";
+                       ($rv, $sth) = $S->db_select({
+                               ARCHIVE => 1,
+                               WHAT => 'count(sid)',
+                               FROM => 'comments',
+                               LIMIT => 1,
+                               WHERE => qq|sid = $q_sid|});
+                       $stat = $sth->fetchrow() unless !$rv;
+                       #warn "sid $sid not in archived comments table";
+                       $sth->finish();
+               }
        } else {
                $stat = 0;
        }



-- HuSi - It's what scoop's for.


Bug in comment ratings for archived comments. | 4 comments (4 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search