- Affected version
- 2.1
In XF1 the positions were still correct.
PostId was taken into consideration here
In XF2 this is no longer considered.
Why? We are wondering for days - despite "Position Rebuild" why this is so.
YES! A thread was merged and now it contains 2 posts with the same timestamp
Only a check of the code of XF1 vs XF2 resulted in the solution. Here too (as in other areas) a step backwards was taken.
Code:
SELECT post_id, user_id, username, post_date, message_state, position
FROM xf_post
WHERE thread_id = ?
ORDER BY post_date, post_id
PostId was taken into consideration here
In XF2 this is no longer considered.
Code:
UPDATE xf_post
SET position = (@position := IF(message_state = 'visible', @position + 1, GREATEST(@position, 0)))
WHERE thread_id = ?
ORDER BY post_date
Why? We are wondering for days - despite "Position Rebuild" why this is so.
YES! A thread was merged and now it contains 2 posts with the same timestamp
Only a check of the code of XF1 vs XF2 resulted in the solution. Here too (as in other areas) a step backwards was taken.