-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.3
-
None
-
PHP Environment:
Database:
This is a duplicate of PHPBB3-7937, but that was closed as unreproducable. If the correct procedure would have been to reply to that ticket, apologies.
Working with the reporter of the previous bug, we found out what is most likely going on. The user has pruning enabled. The current code in acp_main.php works out a certain batch size and then starts selecting counts based on the post ID, with post IDs between an upper and a lower limit, determined by the batch size.
If there are no results in the batch, the code assumes it has reached the end of the entire post ID range and bails out.
However, if there is a gap in the post IDs larger than the batch size, for example due to pruning, there will be empty batches halfway through the process, causing the process to stop prematurely.
Attached you find an SVN patch that modifies the code by finding the maximum post ID (by examing the last post IDs from the forums table, I thought that might be more efficient than going to the actual posts table) and only stopping if the lower limit of the batch is bigger than the last post ID. I have added a log message in case the last post ID can not be found, which needs to be added to a language file somewhere.
- is duplicated by
-
PHPBB-7937 Resynch Post count sets to Zero (0)
- Closed