Opened 23 months ago
Last modified 17 months ago
#6588 new defect (bug)
Allow multiple changes on one topic edit
Reported by: | sterndata | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Support Forums | Keywords: | |
Cc: |
Description
When modifying a post to change the forum (e.g., requests and feedback to fixing wordpress), changing the stats of the NSFW box at the same time gets lost if it's the same transaction.
Change History (6)
#3
@
23 months ago
- Component changed from General to Support Forums
I couldn't see any reason this would happen at first glance.. until I tested it.
The handler to move a topic between forums runs before the handler to set the NSFW flag.
In my testing, the operation to move between forums times out with a 504 error during the move, causing the NSFW flag handler to never run.
The order of operations is something like this:
- Update thread/reply contents
- Move topic to different forum
- Update topic replies to the new forum
- Recount forum thread counts for old and new forums <--- Times out here
- Process extra thread operations (Including the NSFW handler)
We'd need to figure out how to disable bbPress forum counting in order to fix this.
Move handler: https://github.com/bbpress/bbPress/blob/394ae31c059228e866240076db2dc2ca2ddc8a7c/src/includes/topics/functions.php#L950-L1083
Interestingly, the wp-admin edit interface can move between forums without timing out, so I guess it might not run the recounts.. which would likely be a bbPress bug..
I can think of no reason for that to occur. Does this only happen when you're moving a post between forums? Are any other fields, like the content, affected?