카테고리 순서 변경 시 422 오류 발생 [진짜 오류 'invalid slug' 가시성 개선]

Continued from: Error 422 when reordering categories

I’m seeing the same error on our hosted instance (discourse.julialang.org) right now — we’d be happy to have some @staff hop on over and repro!

2개의 좋아요

I can see this in your logs ActiveRecord::RecordInvalid (Validation failed: Slug is invalid). Is there a particular category this triggers on?


Looking a bit more closely, it seems you may have a few categories without slugs. Not sure what the circumstances are there, but we’ll dig a bit deeper… :slight_smile:


@mbauman More specifically, you had a category slug that was only numbers (2019) which didn’t pass the validation check (likely added after the category was created). I believe adjusting that has made everything come good. :+1:

Does this sound like it could be the same for you @Christina?

5개의 좋아요

Fascinating — yes, I was trying to move that category’s parent placement! Note that the placeholder text for the empty category slug still states that it’s optional:

image

I think those ones were a red herring and actually it was the ‘only numbers’ one that was the true culprit. :slight_smile: The empty ones seem quite happy now that’s been changed.

4개의 좋아요

Yep, I just filled in the slugs and now was able to re-arrange things once again! Thanks!

1개의 좋아요

근본 원인이 명확해졌으니 이제 Contribute > Bug 채널로 다시 옮기는 것이 좋을까요? 간단히 말해, 슬러그(slug)가 채워지지 않은 채로 "2020"과 같은 이름의 하위 카테고리가 존재하고 있었습니다. 그런 상태에서 상위 카테고리를 이동하려고 하면 422 오류가 발생했습니다. 커스텀 슬러그를 지정해 주니 문제가 해결되었습니다. 이제 오류 메시지를 더 실행 가능하게 만들거나 문제를 직접 해결할 수 있는 구체적인 버그 수정 사항이 있을 것 같습니다.

1개의 좋아요

여기까지 거슬러 올라가면 또 다른 언급을 볼 수 있습니다:

그 오래된 Contribute > Bug 주제에는 몇 가지 다른 사례가 섞여 있었던 것 같습니다. 이 주제의 작성자(OP)는 여러분의 문제와 동일한 문제를 겪고 있지 않을 수 있습니다.

여러분의 문제를 깔끔하게 분리하고, 팝업에서 오류 메시지를 더 명확하게 표시하도록 제안하는 것이 좋습니다.

1개의 좋아요