Failed to add project topic with CJK characters

When creating an invalid project topic, such as naming with CJK characters (expand the original bug report below) through topic_list, the errors on the project topic fail to populate onto the project errors object.

There's some unconventional setting of topics which makes this harder than it should be. The setting of topics at https://gitlab.com/gitlab-org/gitlab/-/blob/8836633beef3be9740d6938b89cca648199958e4/app/models/project.rb?page=4#L3457 raises an error.

The errors should get populated back onto the project object so they are presented on the project form.

Original bug report

Summary

On project settings page, failed to add new topic with CJK characters.

Steps to reproduce

  • visit a project on gitlab.com
  • visit project settings page
  • Add トピック as new topic
  • Click save Changes
  • Will show Project could not be updated!

Example Project

Any project

Relevant logs and/or screenshots

Response params
截屏2024-08-15_10.40.09 截屏2024-08-15_10.40.32
Edited by Alex Pooley