1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sort order affecting number of threads displayed. HELP!

Discussion in 'Troubleshooting and Problems' started by Mouth, Feb 8, 2013.

  1. Mouth

    Mouth Well-Known Member

    I've had a nagging and ongoing issue for some weeks now, and after much diagnosis and testing I just cannot resolve it. (n) Please help! :)

    Issue: When displaying the thread list for a forum, the sort order is affecting the quantity of threads displayed on the page. Examples ...

    LastMessage.png StartDate.png

    You can see when the display is sorted by Last Message it only shows 2 threads, but when sorted by Start Date it correctly shows 30 threads. Interestingly, if I change the sort order to Last Message Ascending then it correctly shows 30 threads, change it back to Last Message Descending and it shows only 2 threads.

    I have turned all Add-Ons off (via "$config['enableListeners'] = 0;" in config.php) with no resolution. I have rebuild both Forum cache and Thread cache (including tick on for 'Rebuild position and post counters') with no resolution. I am using the Default Style (as per attached screenshots) to ensure it's no something introduced by my normal style (which has the same issue too).

    Any resolution or tips/ideas would be much appreciated.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I have never seen this before, and I have no idea what could be causing it considering you already disabled addons and rebuilt the caches.

    I can take a look if you give me admin and FTP access.
    Shelley likes this.
  3. Mouth

    Mouth Well-Known Member

    Conversation message sent. Many Thanks!
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There was a problem with the indexes on xf_thread_read. I was able to fix it on my server (using your data) by running these queries:

    But the second query returned an error when I ran it on your server. The IGNORE part didn't work which resulted in duplicate key errors when recreating the index. I had to drop the table and recreate it on your forum. This has fixed the problem, but existing read markers will be reset now.
    Shelley likes this.
  5. Mouth

    Mouth Well-Known Member

    Very much appreciate your assistance on this unusual issue Jake, and sticking with me to resolution.
    I hope the PayPal donation is enough to give you (and your spouse or loved ones) a reasonable dinner or overnight stay somewhere nice, or a round of brewski's for you and some mates ... whomever your attention could have otherwise been given instead of working through this issue :)
    Jake Bunce likes this.

Share This Page