Wiki status of first post does not confer the ability to edit tags, category or title

Our community uses “Make new topics wikis by default” across categories. We set min trust to edit wiki post as TL0, as well as min trust to tag topics to TL0. Previously, this allowed anyone in the community to add tags to topics created by others, and it appeared to work well (although I believe previously we had the TLs set to the defaults and decided to lower them). We have noticed that this function is no longer working—when a user attempts to add a tag via the “Edit wiki” feature, it shows up in the change log and gives the user a “wiki editor” badge (if they didn’t have one already) but doesn’t actually add the tag to the topic. Editing the text of the topic via the “Edit wiki” feature still works fine.

Any ideas what could be causing this?

2 Likes

Adding to this that changes to the topic title, category, Events plugin date/time also aren’t holding currently with the Edit Wiki function. Editing the body text of the topic is the only function that is working.

1 Like

Did you add weird permissions or required grouping to your tags recently?

Can you repro this @tshenry?

I can repro the behavior, but is this intentional? Should every aspect of a wiki topic be editable by users with wiki privileges, or just the content?

I think it might make sense to restrict title/category/tag edits to the topic owner and anyone with the power to edit those aspects in normal topics. I can edit the title/category/tag as TL3, for instance, under the trusted users can edit others setting, but not as a lower trust level.

I can’t speak for how the Events plugin should handle this, but I am able to use the insert date/time feature and save the change without issue as TL0.

It’s a good question, I can’t recall how it originally worked, perhaps this has always been the case? My gut says that wiki on first post means you can edit everything about the first post, but perhaps the older versions of Discourse behaved differently in this regard? Anyone remember?

I strongly suspect this is a regression though @tshenry

2 Likes

It’s very possible. I tried to search recent commits for anything suspicious, but nothing immediately popped out.

@Elena_Lappen do you have any idea about when the change in behavior took place? Or at least the last time you know it worked the way you wanted it to?

2 Likes

I remember testing it when replying to a user who asked about the Edit Wiki feature and tags specifically on June 10, and it worked.

1 Like

For what it’s worth, back in April 2018 on community.wanikani.com after losing Regular status I realized that I couldn’t edit the title of a certain topic even though the first post was a wiki and I could edit the post’s content. And then someone else was complaining about the same thing on the same topic just two months ago.

I can’t speak to tags though.

2 Likes

Thanks for sharing that. I have a hard time believing this is intended behavior because, for example, changing the title of the topic registers as an action in the edit history, but it doesn’t hold.

I almost forgot, search is our friend :slight_smile:

That’s from back in early 2017.

Not sure what the best path forward is. I can see arguments for and against allowing everyone with wiki editing privileges to also have the ability to edit the title/category/tag. Maybe a setting makes sense? What do you think @codinghorror?

1 Like

Unless you (or we) can absolutely verify this used to be the case @Elena_Lappen I think the status quo is the way to go here. Title, tags, and category edit is not granted by wiki status on the first post – just the body.

I just confirmed that it does in fact append to the edit history (but with no visual change in the diff) and it modifies the post timer to say it was just edited. That does seem like a bug to me. If I just open a wiki post and click save without making any changes, it doesn’t append to the history, so it should probably work the same for a rejected change.

That said, shouldn’t the UI not show the fields for editing the title/category/tag if the person editing doesn’t have permissions to edit those fields?

2 Likes

Sounds like we need to revisit this @sam @eviltrout and make a decision.

I lean towards letting wiki editors edit tags, as those are lightweight and don’t confer security, but not category or title.

4 Likes

This seems like a good potential solution to me.

I think:

  • Wiki editors should be allowed to edit tags as long as: min trust level to tag topics is met.

  • Wiki editors should not be allowed to change category, unless they have TL3

  • Wiki editors should not be allowed to change title, unless they have TL3

  • We should definitely not be doing anything surprising here.

    • If you can’t edit tags, the tag section in composer should be readonly.

    • If you can’t edit title, the title section in composer should be readonly.

    • If you can’t edit category, the category section in composer should be readonly.

@codinghorror you good with ^^^

6 Likes

Looks good to me :+1:

1 Like

@vinothkannans can you confirm / implement ^^^ :hugs:

3 Likes

Also if you try to edit the post but do not actually change anything, your save attempt should fail. Or at the very least not create a new revision.

2 Likes

Checking back in to see if there are any updates on this!

1 Like

We hope to have this implemented in a week or 2.

2 Likes