ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Spam comments not appearing in Edit page

November 06, 2007 5:28am

Subscribe [1]
  • #1 / Nov 06, 2007 5:28am

    chiltonm

    16 posts

    I have recently noticed that quite a few comments (all spam) will appear in the Control Panel home page but when I go to Edit and select Comments they don’t.  This means that it takes much longer than usual to delete them.

    Just in case you were wondering these are not trackbacks and I have tried ordering by date.

  • #2 / Nov 06, 2007 10:12am

    Robin Sowell

    13255 posts

    Hm- I’m poking the backend looking for possibilities.  What build/version are you running?  And for testing- if I go to edit, filter just on ‘comments’- the resulting page is one where you aren’t seeing some of the comments from the front page- correct?  Also- how sure are you they aren’t in there at all- or could it be there’s an order issue and they’re on a different page number?

  • #3 / Nov 06, 2007 10:51am

    chiltonm

    16 posts

    Build: 20070627 v1.6.0

    As for testing?  You’re absolutely right.  I am also pretty sure that these comments aren’t appearing further down the list.

    Perhaps if next time this happens I upgrade to the latest build and show it happening in gruesome detail?

  • #4 / Nov 06, 2007 11:05am

    Robin Sowell

    13255 posts

    I’m leaning that way.  Granted, it’s hard to replicate, but nothing is jumping out at me.  Do you still have some of them in there that aren’t showing up?  If so, might as well dig a bit now.  If not- I’d say upgrade to the latest and the next time it happens (if it happens) we take a look at the specifics of the comment via the db and see if we can spot why it wouldn’t show.  Easy enough to find it in the db- and I think that would give us a good hint.

    Sound good to you?

  • #5 / Nov 06, 2007 11:22am

    chiltonm

    16 posts

    Alas, I have no dodgy comments left as far as I aware.  But next time it happens I’ll make sure I’m bang up to date and give you the heads up.

  • #6 / Nov 06, 2007 11:24am

    Robin Sowell

    13255 posts

    Good deal- I’ll admit I’m curious.  But w/out one to look at, debugging would be hard.

  • #7 / Nov 07, 2007 7:55am

    chiltonm

    16 posts

    OK we’ve got one and I’m using the most recent build.  And it’s getting weirder.  I have now found the spam comment.  It’s at the top of Page 2 of the results along with a few others.

  • #8 / Nov 07, 2007 10:01am

    Robin Sowell

    13255 posts

    OK- think I’ve got it.  It looks like the main query orders by the entry date of the article- not the comment.  Take a look- is that consistent w/ what you’re seeing?

  • #9 / Nov 07, 2007 11:18am

    chiltonm

    16 posts

    Sort of.  Certainly these spam comments were on older posts.  But within each page the comments are in perfect chronological order of the comment.  Sounds like two different orderings are taking place - first by date of entry, second by date of comment.

  • #10 / Nov 07, 2007 11:24am

    Robin Sowell

    13255 posts

    Oh wait- how are you viewing the comments?  On the edit page- you filter just by selecting ‘comments’?  Or- is it clicking on the latest comment link and then ‘view comments’ for just that entry?

    Er- make sense?

    Because going via the main ‘edit’ page filter, I’m fairly sure that it’s just ordering by weblog entry date.

  • #11 / Nov 07, 2007 11:51am

    chiltonm

    16 posts

    I am viewing the comments via the edit page - not by clicking the latest comment link.

  • #12 / Nov 07, 2007 12:00pm

    Robin Sowell

    13255 posts

    OK- we’re on the same page then.  There’s only one sort order specified, and it’s by weblog entry date.  Comment entry date isn’t a factor.  But- when the weblog entry date is the same?  MYSQL automatically sorts by the key I believe- in other words, the comment_id.  And comment_id’s will be chronological.  So- yep, it will be sorted by entry date, then w/in the same entry date, it’s effectively sorted by comment date.  Not because of the query per se- but just due to the sql default behavior.  Basically.

    So- is that working as expected?  Or are those spam comments out of order- i.e., not w/their ‘brothers’ under the same weblog entry?

  • #13 / Nov 07, 2007 12:31pm

    chiltonm

    16 posts

    When I specify sort order, within each page of results, comments are displayed in chronological order.  There can be large gaps between brother comments of the same parent entry and the comments between them are from entries with different dates from the parent entry.

    Incidentally, I should point out that my original problem is solved.  I now know where to look for spam comments.

  • #14 / Nov 07, 2007 12:37pm

    Robin Sowell

    13255 posts

    Hm- true, issue is solvd.  But seems kind of odd behavior to me.  I looked at the code pretty hard- unless I’m totally in the wrong place, order is handled via:

    if ($order)
            {
                $pageurl .= AMP.'order='.$order;
            
                switch ($order)
                {
                    case 'asc'   : $end .= "entry_date asc";
                        break;
                    case 'desc'  : $end .= "entry_date desc";
                        break;
                    case 'alpha' : $end .= "title asc";
                        break;
                    default      : $end .= "entry_date desc";
                }
            }

    So- all the comments for a single entry really should cluster- unless there’s another entry with the exact same date (or title- if title was the specified order).  Hm.  That look like a likely cause (I don’t think so with dates)- or want me to give the crew a ‘heads up’, just to see.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases