OP can change the title/category after the Edit Window Period

AI-generated summary

Discourse Bug/Feature: Edit Title/Category/Tags Outside of Edit Window

User cpradio discovered that the OP of a topic can change the title, category, and tags even outside of the edit window time period. The expected behavior is for the edit icon to disappear after the edit window has expired. However, the edit icon for the title/category/tags area remains available, allowing users to make changes indefinitely.

cpradio confirmed that this issue occurs on try.discourse.org as well.

zogstrip explained that the “post edit time limit” setting only applies to posts, not titles, categories, and tags, which can be changed without any limit. cpradio questioned the intention behind this design, suggesting that it might be a feature rather than a bug.

zogstrip later agreed that the current behavior doesn’t make sense and provided a fix: https://github.com/discourse/discourse/commit/1a070b16e4e1f3e1b3c93e28cb83803b98696e77

It seems the OP of a topic can alter the title/category/tags of their topic any time, even outside of the edit window time period.

Repro steps:

  1. As a TL 2 or below user, create a topic in a specific category
  2. Wait till edit window has expired (you may need to temporarily set the edit window to a smaller time frame)
  3. Refresh the page the topic is on
  4. Note that the edit icon for the post is missing (designating you are outside of the edit window)
  5. Note that the edit icon is still available on the Title/Category/Tags area
  6. Click on the edit icon and change the title, category, tags, whatever and save them.

Expected:
Edit icon next to topic title should also disappear if the edit window has expired

Actual:
Edit icon continues to appear next to topic title

3 إعجابات

Happens on try.discourse.org too

I think you are confusing the “ninja edit window” and the “post edit time limit” settings.

The former is used to deal with versions of the post while the later is used to prevent users from editing/deleting their post after a certain amount of time.

Right now, that setting only applies to post. Which mean that users can change the title, category and tags of their topics with no limit.

So that is intentional? Seems like an odd decision to let a user constantly change the category of their topic including adding/removing tags. So maybe this isn’t a bug but more of a feature to let the topic use the post edit time limit?

إعجاب واحد (1)

Yeah, doesn’t really make sense. Here’s a fix :snake:

https://github.com/discourse/discourse/commit/1a070b16e4e1f3e1b3c93e28cb83803b98696e77

6 إعجابات