부모 카테고리를 선택하고 설정에 실패해도 카테고리 선택기가 업데이트되면 안 됩니다

In my example, I’m trying to set a parent category on a category that already has a child category. Naturally, I hit an error message. Despite this, the category selectors are updated as if my action was successful.
Navigating back to the topic list (through the previous button from my browser) and back to the category edition leads to a 404.

These navigation issues persist until I force a page refresh.

The interface shouldn’t be updated in real-time to reflect a change if that change didn’t work. :slight_smile:

4개의 좋아요

Agree we should fix, putting a pr-welcome on this for now.

Hi @sam, I’d like to fix this.
I’m learning Rails and figure this word be a good issue to dive into a Rails code base.

Btw, I’m interested on the backend side of Rails, let me know if you know any bug I can help with:). Thanks!

Sure, feel free to give it a shot!

@sam could you review Fix: Handle failing to update parent category by DukeManh · Pull Request #24401 · discourse/discourse (github.com) please?

Do you think it needs test? If yes could you refer me to a file that does testing?

Ideally it needs a test, but even as is it is helpful … thanks @DukeManh

1개의 좋아요

I added a test and went ahead and merged it. Thanks, @DukeManh, for the contribution!

https://github.com/discourse/discourse/pull/24401#pullrequestreview-1750578047

3개의 좋아요

This topic was automatically closed after 20 hours. New replies are no longer allowed.