Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15232

Last Post is calculated by post_id instead of post_time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.2.0
    • Viewing forums
    • None
    • phpMyAdmin 4.7.0, MySQL 5.6.35, Ubuntu 14.04.5 LTS, IE 11.0.9600.18537 and Firefox 52.1.1 (32bit) ESR

      The forum sync function (determine last post) is using the post_id to determine the "last post" of the forum. This does not always generate the correct result, depending on the state of the database - specifically, when a bulletin board is imported from elsewhere into phpBB.

      Using the post_time would give the correct result, regardless of the post order in the database.

      In my situation, topic_id 25 (post_id 73) has a message time of 1460449200, but topic_id 4 (post_id 16) has the newest message time of 1485184800 (2 years newer). However, post_id 73 is always calculated as the last post (until a brand new post in the forum is made).

      As a test, I changed the post_id from 16 to 2000 and synchronized the forum. The last post then displayed correctly (post_id 2000).

      This bug does not create big issues - just cosmetic/annoyance type problems. This bug becomes invisible once a new post in the forum is made after a database import (largest post_id is the newest time).

      I am willing to test code, as my migration to phpBB is still in process (not live).

            Unassigned Unassigned
            user1492 user1492 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: