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.

comments all out of order, not obeying ordering or sort

July 11, 2009 4:22am

Subscribe [3]
  • #1 / Jul 11, 2009 4:22am

    Reese Spykerman

    41 posts

    Hi there,

    Got a strange issue. Out of the blue (I know how suspicious that sounds!) my client’s comments started ordering themselves randomly. They were fine a few days ago. She doesn’t touch the templates or admin stuff, and I haven’t been in there, so that’s weird. I wonder if any kind of hosting changes might cause this? Anyway…

    So I tried forcing these tags:

    {orderby="date" sort="asc"}

    and it’s not obeying my command. The full code looks like this:

    {exp:comment:entries weblog="weblog1" orderby="date" sort="asc"}
    
    {if email != "[email protected]"}
    {comment}
    <h3 class="testimonialsbyline">{name}{if location} ,{location}{/if}</h3>
    {/if}
    
    {if email == "[email protected]"}
    {comment}
    <h3 class="testimonialsbyline client">Clientname</h3>
    {/if}
    {/exp:comment:entries}

    Note these are not wrapped in an weblog:entries tag.They exist on a /comments/ template, and the url title is being passed from the prior page to the comments page.

    I have also tried, “order_by” (with underscore) as well as “desc”. The order of the comments ids jumps around all over the place.  One page’s comment ids look like this order:
    320
    328
    329
    332
    333
    327
    326
    321
    322
    (when I check by date, also all over the place)
    and so on…

    Her comments are not moderated. Captcha is being used. Comments are allowed on this particular weblog. Dynamic is ‘on’ which—if I set it to off—just makes all the comments disappear (as it should)

    Here’s the rub: she’s on ee version 1.4.2 build 20060612  and not keen to upgrade at this time. She can’t afford any downtime on her site at the moment. I understand, empathize and absolutely get why you need latest version to troubleshoot things, but if there’s any way to help me out in this instance it would be most appreciated. I am trying to see if we can schedule an upgrade, but if there’s any way to help this now, it would be wonderful. 😊

    Much thanks,
    Reese

  • #2 / Jul 11, 2009 6:46am

    Musa

    124 posts

    can i see it online with the entry_id?

  • #3 / Jul 11, 2009 7:25am

    Mark Bowen

    12637 posts

    It could perhaps be the {if} conditionals that you have surrounding the output maybe?

    I know that the e-mail address you have shown there is probably not the actual one in the system and just for demonstration purposes but perhaps that could be doing it. A quick check to see if that’s the case would be to just do this for now :

    {exp:comment:entries weblog="weblog1" orderby="date" sort="asc"}
    
    {comment}
    
    {/exp:comment:entries}

    See if things come back in the right order now and if they do then you know it was something to do with the conditionals.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #4 / Jul 11, 2009 8:32am

    Reese Spykerman

    41 posts

    Mark, you’re kind. Thank you.
    That didn’t work. She agreed to an upgrade, which I’m going to do now. If it fixes it, I’ll post back and let you know, and if it doesn’t, at least we have the latest version to work from. 😊
    Reese

  • #5 / Jul 11, 2009 10:32am

    Reese Spykerman

    41 posts

    well, at the risk of stating the obvious…
    the upgrade fixed it. No other work was needed. Thank you again for your help. Hope this may help someone else on an older version who experiences similar issues 😊

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

ExpressionEngine News!

#eecms, #events, #releases