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

XF 1.1 Some Forum Threads Aggregate All Posts to First Page

Discussion in 'Troubleshooting and Problems' started by denzil, Jul 8, 2013.

  1. denzil

    denzil Member

    So, I used a third-party service to convert our Drupal data to XF data. Unfortunately, some of the threads have this problem where all the posts in the the thread are aggregated to the first page (without proper pagination) and the remaining pages are 'blank.' I figure that this is probably just a simple database fix but what I'm wondering is what database column am I looking for? I'm checking out the xf_thread table and I don't really see anything that indicates any sort of pagination. I guess I'm not exactly looking at the right spot?

    Any help is appreciated. :)
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Does it do this without any add-ons activated?
     
  3. denzil

    denzil Member

    IIRC, I believe this was doing this before the add-ons were installed. However, I just turned off the add-ons and it looks like it's still doing it. Something potentially key to note is that after the first post, every other post thereafter is listed as "#2."
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    Yes, its due to the way XenForo handles fetching posts (its position). You'll need a query to go through and renumber them. I'm not sure if this can easily be done with a query.
     
  5. denzil

    denzil Member

    Yeah, XF is still new to me and I don't really know the relations in the database too well. If I did, I think it could be somewhat straightforward.
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    post positions need to be sequential based on post date and thread ID.
     
  7. denzil

    denzil Member

    Thanks for that, I think I figured it out. The SQL query is: SELECT * FROM `xf_post` WHERE thread_id=number. "number" is the thread id number.

    Going to do an update to see if it fixes things.
     
  8. denzil

    denzil Member

    Looks like the above works as far as ordering the posts. Just need to figure out a better query to do it in one batch. I'm still not sure yet if it'll fix pagination but I think it just might. I'm guessing all the posts are on the first page only because the posts are considered the same number.
     
  9. Jeremy

    Jeremy XenForo Moderator Staff Member

    Yeah. It finds 1-20 on the first page. Since they are all #2, they all get found.
     
  10. Mike

    Mike XenForo Developer Staff Member

    Go to tools > rebuild caches and rebuild threads, but select the "rebuild post position" option.
     
    Jeremy likes this.

Share This Page