[fixed] Bug in the category-custom-permalinks in s9y 0.9 SVN

Found a bug? Tell us!!
Post Reply
Boris

[fixed] Bug in the category-custom-permalinks in s9y 0.9 SVN

Post by Boris »

I've just included (full?) custom-permalink to the google-sitemap-plugin and it seems that I discovered a Bug.

When using this Permalink Category URL structure:

Code: Select all

categories/%year%/%month%/%id%-%name%/%description%.html
the %year% and %month% are not replaced properly by s9y, so I get a link like

Code: Select all

http://localhost/~boris/trunk/categories/%year%/%month%/1-test/desc.html
which results in a HTTP-"Bad Request".

P.S.: The version I used was received from SVN about an hour ago.


EDIT: The %username% seems to be interpreded as %realname% too:

Code: Select all

authors/%username%-%realname%
results in

Code: Select all

http://localhost/~boris/trunk/authors/Realname-Realname
although the username is Boris.
I think the second bug is in line 638 of functions_entries.inc.php where the key 'username' gets the value of $entry['author'] too.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bug in the category-custom-permalinks in serendipity 0.9

Post by garvinhicking »

Uhm the "Category URL structure" does not allow for %year%, %month% - categories have no timestamps to use. Are you talking of the Entry URL structure?

About the username/realname thing, I think there was a reason for this (some BC thing I'm afraid), but I can't currently remember it. I'll try to look into this, many thanks!

Regards
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/
Boris

Re: Bug in the category-custom-permalinks in serendipity 0.9

Post by Boris »

garvinhicking wrote:Uhm the "Category URL structure" does not allow for %year%, %month% - categories have no timestamps to use. Are you talking of the Entry URL structure?
No, I'm talking about the Categort-Structure. So I guess only the description is wrong:
serendipity_admin.php?serendipity[adminModule]=configuration wrote:Permalink Category URL structure
Here you can define the relative URL structure begining from your base URL to where entries from certain categories may become available. You can use the variables %id%, %name%, %description%, %month%, %year% and any other characters.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bug in the category-custom-permalinks in serendipity 0.9

Post by garvinhicking »

Many thanks, I corrected this issue!

Regards,
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/
Post Reply