A user reports an issue where moving a single post fails with a PG::UniqueViolation error due to a duplicate post_number in the target topic RGJ. The error occurs even though the post being moved is the one causing the conflict. The issue is isolated to a single post on a stable site, and while it cannot be easily reproduced, another user gerhard notes a similar problem with imported posts failing validation during moves. A fix has been implemented in Discourse, with a reference to the relevant commit 0ecdf900230eee21beaf54b80428bd18768127ae.
Hmm…I’ve moved many posts around in the last 2 weeks without issue. @RGJ, is this site on tests-passed or stable? Is this just a single post with issues, or global? Can you still repro it?
I understand - but we can only repro this on one post on one forum so far.
I wasn’t expecting an immediate solution, just reporting it for documentation purposes, and maybe getting some advice, or hearing from other people who’re seeing the same issue allowing us to maybe see a common pattern.
I’ve noticed the same problem with imported posts. They do not always conform to requirements like min_post_length. Moving posts triggered those validations and silently prevented the posts from being moved to the target topic. It should be fixed.