[wp-hackers] /author/ is still broken.
David House
dmhouse at gmail.com
Wed Feb 1 22:32:09 GMT 2006
On 01/02/06, Ryan Boren <ryan at boren.nu> wrote:
> Works for me.
If you've been creating users with Firefox this could cause the
problem. Because user_login is a disabled field on user-edit.php,
Firefox choses not to send the value of the field when you hit submit.
This means that user_nicename doesn't get properly filled from the
login; each user's user_nicename is something like '10' or '4', so the
correct URL for them ends up being something like /author/10, not what
you expect.
I've written a patch which just displays the user login as text on
user-edit.php (this makes more sense as you can't edit it anyway), and
puts the user login in a hidden field. This should fix it when
creating new users. For now the easiest way to fix this bug is to go
through the database and set the user_nicenames to something more
sane.
Patch attached as above.
--
-David House, dmhouse at gmail.com, http://xmouse.ithium.net
-------------- next part --------------
Index: wp-admin/user-edit.php
===================================================================
--- wp-admin/user-edit.php (revision 3494)
+++ wp-admin/user-edit.php (working copy)
@@ -79,7 +79,8 @@
<fieldset>
<legend><?php _e('Name'); ?></legend>
<p><label><?php _e('Username: (no editing)'); ?><br />
-<input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
+<strong><?php echo $profileuser->user_login; ?></strong>
+<input type="hidden" name="user_login" value="<?php echo $profileuser->user_login; ?>" />
</label></p>
<p><label><?php _e('Role:') ?><br />
More information about the wp-hackers
mailing list