$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Author page points to 404 error page|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Author page points to 404 error page

matteradmin10PV0评论

I am having a membership site in wordpress where there are more than 10K users. Now when the user having a single word user_nicename ( ) try to access their respective author page, then it works just perfectly fine. But when a user having user_nicename including a space character in between ( bond ), it gets converted to this url ( ) and redirects them to a 404 Error Page.

I have gone through some forums and everybody has suggested to modify the db value for this. Since, in my case I am having more than 10K users, its very time consuming to go to the specific table and edit the value for each particular user and moreover, I'll not prefer this solution.

Can anybody suggest me some solution for this issue?

I am having a membership site in wordpress where there are more than 10K users. Now when the user having a single word user_nicename ( http://example/author/james ) try to access their respective author page, then it works just perfectly fine. But when a user having user_nicename including a space character in between ( http://example/author/james bond ), it gets converted to this url ( http://example/author/james%20bond ) and redirects them to a 404 Error Page.

I have gone through some forums and everybody has suggested to modify the db value for this. Since, in my case I am having more than 10K users, its very time consuming to go to the specific table and edit the value for each particular user and moreover, I'll not prefer this solution.

Can anybody suggest me some solution for this issue?

Share Improve this question asked Nov 15, 2012 at 16:19 swtshwetaswtshweta 4326 silver badges16 bronze badges 1
  • Out of curiosity: how did you even manage to get spaces in your user_nicename values? – Chip Bennett Commented Nov 15, 2012 at 16:49
Add a comment  | 

1 Answer 1

Reset to default 1

The user_nicename should never have spaces. It is a sanitized version of user_name, that has been sanitized (Aa-Zz,0-9,_,-) to be suitable for use as a slug.

If you have spaces in your user_nicename values, you're going to get 404 errors. To correct, you'll probably need to edit the database directly. Here are instructions, with screenshots, for doing so via PHPMyAdmin.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far