Status: Open (View Workflow)
CentOS 7.5.1804, Apache/2.4.6 (CentOS), PostgreSQL 9.2.23, PHP 5.4.16, Firefox 52
Shadow topics have their (un)approved posts count only synchronized when viewed in viewforum.php.
phpBB 3.1.0 introduces the softdelete feature.
phpBB 3.1.0 replaces forum_id_unapproved_topics with forum_posts_unapproved.
The migration script (phpbb/db/migration/data/v310/softdelete_p1.php) recalculates forum totals of (un)approved post counts.
The script wrongly includes shadow topics' (un)approved post counts.
That means this can happen, which happened to me:
- A topic has a post marked as unapproved.
- Moderator A moves a topic that has unapproved posts.
- Moderator A approves all posts in the moved topic.
- There are now no unapproved posts in phpbb_posts.
- Nobody ever views the shadow topic in viewforum, it doesn't get updated.
- The shadow topic contains the pre-move unapproved post count.
- phpBB 3.0.X doesn't display if a forum has unapproved posts, only topics.
- phpBB 3.0.X doesn't display topics with unapproved posts in the MCP.
- Everything seems fine.
- phpBB is updated to phpBB 3.1.0 or higher.
- Forums now hold a count of their unapproved posts.
- phpbb/db/migration/data/v310/softdelete_p1.php adds shadow topics to this count.
- phpBB 3.1.0 onwards display if a forum has unapproved posts in it.
- Forums with these 'bad' shadow topics are marked as having unapproved posts.
- phpBB still doesn't display topics with unapproved posts in the MCP.
- Viewing the shadow post will not decrement the count.