I can confirm this is an issue. Sorry about that! I’m looking into it now. I’m assuming by “latest” you mean 1.0.6. If this is true, do you know what version you were using before upgrading to 1.0.6?
Thread Starter
mealto
(@mealto)
No need to apologize Brandon. Thank you in advance.
I should clarify, the old Edit Author Slug was set up and working well and this was a few versions back. Sorry, I don’t have access to WP backups so cannot check. But more importantly, what caused this breakdown was also happening in the old version. We edited an Author’s Bio, then click Save and the Slug caused the 404. It was then that we updated WP and Edit Author Slug to their latest versions thinking this may resolve the problem.
Hope that helps.
Thanks! That helps a lot actually. I think I’ve tracked down what’s going on, and as you’ve discovered, the issue would have been around for a while.
Thread Starter
mealto
(@mealto)
Wow, you are fantastic Brandon. I was about to download an older backup and unzip it to see if I can dig up the versions. Will check here for any updates. Appreciate it!
So, I’ve spent some time on this, and it’s, effectively, a limitation on WP’s end.
Before a user nicename (author slug in Edit Author Slug terminology), post slug, category slug, etc, can be saved to the database, it first has to be encoded into a URL-friendly version. In the case of UTF-8 characters, this means that 作者 will be converted to %e4%bd%9c%e8%80%85. On top of that, user nicenames are further limited to ASCII characters.
I can work around this restriction. However, on top of that, the user nicename field is limited to 50 characters. So, after the URL-friendly version is created, and even with the workaround, you are effectively limited, in my testing, to about 4 or 5 Chinese characters. This may be sufficient for the Chinese names represented in character form, but since I don’t know Chinese, I can’t say for sure.
I think the best way forward, at this point, would be for me to improve checks and error messages for author slugs containing UTF-8 characters, and to add a note, on the user edit screen, warning of this limitation.
Thread Starter
mealto
(@mealto)
You are fantastic for figuring this out. Yes, this may have appeared after a recent WP update. But nothing showed until we saved the Author bio. For our purposes, I would like to try as the Author name in Chinese would be 3 characters. Just a heads up, most Chinese names are 3 characters if that helps.
Let me know what I can do to patch this up. Or just wait till the next update.
Sorry it took a little bit. While investigating this issue, I came across a number of places where improvements could be made related to updating author slugs. For instance, you should have never ended up with an empty author slug, which is what would happen when you tried to save Chinese characters. Reworking this area of the plugin took some decent refactoring, so I decided a new, major release was in order. Of course, that meant I just *had* to stuff a new feature in. So, now there’s the ability to bulk update all user author slugs at once.
Anyway, as I mentioned above, I went ahead with the way WP handles things, by not allowing most UTF-8. However, I added a way to get around this. The below plugin will work as-is. Just upload, activate, and save Chinese characters. It’s basic, but gives you a solid foundation if you’d like to customize it further for your needs.
https://gist.github.com/thebrandonallen/462c474a2eb7a726acbb