Was looking at: Removing title from URL breaks links - #21 by codinghorror
And I think this should fixed it:
https://github.com/discourse/discourse/pull/7828
I’m trying to find if this is the best fix and also, when did he stop working, because the file I have modified haven’t been touched for a very long time.