Making WordPress.org

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)

#1 @Otto42
4 years ago

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?

#2 @sterndata
4 years ago

No, it's only the checkbox for NSFW, as far as I can tell.

#3 @dd32
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:

  1. Update thread/reply contents
  2. Move topic to different forum
  3. Update topic replies to the new forum
  4. Recount forum thread counts for old and new forums <--- Times out here
  5. 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..

Last edited 4 years ago by dd32 (previous) (diff)

This ticket was mentioned in ​Slack in #forums by thelmachido. ​View the logs.


4 years ago

#5 @fierevere
4 years ago

#5669 was marked as a duplicate.

#6 @fierevere
4 years ago

related: #5669

#7 @obenland
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.

Note: See TracTickets for help on using tickets.