Hi,
in the serendipity config, I can choose to change the permalink for authors to something that includes the fields %username%, %realname% etc.
The default is %id%-%realname%.
When I set this to %realname%, everything works fine.
However, when I set this to %username%, something is wrong. I can go to the correct url, i.e. /authors/ivo shows my blog entries. However, in the blog, the author link that links to this page, is /authors/Ivo%20Jansch instead of /authors/ivo, leading to a page that displays no entries.
Is there a fix for this? I'm using s9y 1.0.2
Username field bug in permalinks
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Username field bug in permalinks
Hi!
Thanks a lot for this report! Since the 1.0 version line is soon getting replaced by 1.1, I have only patched the bug for the 1.1 SVN branch.
If you know how to apply a patch, here are the modifications:
Best regards,
Garvin
Thanks a lot for this report! Since the 1.0 version line is soon getting replaced by 1.1, I have only patched the bug for the 1.1 SVN branch.
If you know how to apply a patch, here are the modifications:
Code: Select all
Index: include/functions_entries.inc.php
===================================================================
--- include/functions_entries.inc.php (revision 1453)
+++ include/functions_entries.inc.php (working copy)
@@ -350,6 +350,7 @@
e.last_modified,
a.realname AS author,
+ a.username AS loginname,
a.email";
}
@@ -962,7 +963,7 @@
$authorData = array(
'authorid' => $entry['authorid'],
- 'username' => $entry['author'],
+ 'username' => $entry['loginname'],
'email' => $entry['email'],
'realname' => $entry['author']
);
Index: docs/NEWS
===================================================================
--- docs/NEWS (revision 1452)
+++ docs/NEWS (working copy)
@@ -3,6 +3,9 @@
Version 1.1 ()
------------------------------------------------------------------------
+ * Fix bug with using %username% in author permalinks, thanks to oeli
+ from the forums! (garvinhicking)
+
* Fix possible integer wraparound in comment count leading to
a gazillion counter state. Also now show links to the entries
within the administration comment panel. Thanks to Julian Finn!
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/