Opened 4 years ago
Closed 3 weeks ago
#6588 closed defect (bug) (fixed)
Allow multiple changes on one topic edit
| Reported by: | sterndata | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| 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 (7)
#3
@
4 years ago
- Component General → 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..
This ticket was mentioned in Slack in #forums by thelmachido. View the logs.
4 years ago
#7
@
3 weeks ago
- Resolution → fixed
- Status new → closed
comment:3 traced this to the forum move running out of time and memory while recounting the old and new forums, before the NSFW handler ran. [15332] worked around that, and bbPress now avoids the unbounded query itself ([bbpress8047], [bbpress8048]), so [15383] removed the workaround. Moving a topic and changing its NSFW flag in the same edit should now save both. Closing as fixed; please reopen if the flag is still lost.
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?