Topic titles are being parameterized

(Viet Hoang) #1

Our hosted board at WaniKani Community is parameterizing new topic titles.

Can someone look into it?

(Jeff Atwood) #2

What do you mean by that? Can you provide a plain text example here?

(Viet Hoang) #3
  1. Create a topic with title “This is a topic”
  2. Title of topic is being displayed as “this-is-a-topic”.

See screenshot

Note the topic titles are not suppose to be parameterized. Looks like its happening to old and new topics with new posts in at least the last 50 minutes.

(Jeff Atwood) #4

Hmm can we repro this @techapj? This looks like a real bad regression and should be high priority.

(cpradio) #5

I can repro it on latest, after setting slug generation method to encoding

Testing Slug Generation - Playground - Discourse Sandbox by cpradio

I’m assuming it is related to
Downcase encoded slug by default and more specs · discourse/discourse@7c3123a · GitHub

Switching back to ascii

Another topic generation test - Playground - Discourse Sandbox by cpradio

(Viet Hoang) #6

Should I revert back to ASCII on the slug setting for the time being?

(cpradio) #8

You could, the alternative (which I’m testing right now) requires a bit of downtime, but it would be reverting to a prior commit (oh but you are hosted, so this really isn’t an option unless Discourse rolls back the commit).

I’ll know within the next 5-10 minutes if rolling it back solves the problem.

Edited: Best to follow @sam’s advice, I’ll still be rolling back the change on my sandbox to see if the issue goes away. That way I can be conclusive in the issue.

(Sam Saffron) #9

Please do, we will take care of fixing the bug and letting you know when you can switch it back.

(Viet Hoang) #11

Done. Thanks all for looking into this very quickly. Things happen; we appreciate the responsiveness.

(cpradio) #12

FYI, I have confirmed it is indeed that commit that is causing the problem.
One last Title Generation - Playground - Discourse Sandbox by cpradio

I rolled back to the commit right before it and the issue went away. I was already directly on that commit before so, so that was the only commit I had to rollback.

(Alan Tan) #13

This was my bad. I decided to be smart and used gsub! to save on a string allocation. I’ve fixed it in

We actually had a test case for it but the gsub! ended up mutating the expected output so our tests didn’t catch it.

Will deploy it out to our customers ASAP.