Author page?

Jul 2, 2009 at 12:59 PM

Hi there


When I do a post in my blog it puts my name underneath as a link.  However, when I click this it tries to go to a page [firstname]+[secondname].aspx

Can this profile(?) page somehow be created within BE if I login - can't see anything?

Jul 3, 2009 at 12:03 PM

Clicking on the author name that shows in a post is designed to go to a page that shows all the posts by that author.

If you're the only author, this isn't too meaningful.  But if you have multiple editors in your blog, then this allows you to see all posts by a single editor.

You can create a "Page" in the control panel that describes you (i.e. an About Me page).  And then add a link to that page in the sidebar (within a widget, for example).

Jul 3, 2009 at 4:56 PM

But if I have done 2 posts, why does it do a 404 error when I click my name instead of showing my 2 posts?

Jul 3, 2009 at 10:21 PM

I'm getting the 404 too when there is a space in the editor's name.  The link is First+Last and should instead be First-Last.

This is obviously a problem that needs to be fixed.  If there's no space in the name, then it works.  We just need to fix the case where there is a space, and use hyphens instead of pluses for spaces in the name in the URL.

Glad you brought this up!

Jul 4, 2009 at 7:07 AM

I think the latest BE 1.5 have this issue resolved, I have one of the user with space in his username and on clicking of his name I can see the all the post published by him. So I guess this issue has been resolved. Have you tried updating?

Jul 4, 2009 at 11:21 AM

matharuajay: Are you using IIS6 or IIS7?

I'm using IIS7 on Vista and the latest build of BE,  When clicking on an author name like Ben Amada, the URL is:


And I get an IIS7 error:

404.11 - Not Found error
The request filtering module is configured to deny a request that contains a double escape sequence.

The 'request filtering module' is one of the modules that must come with IIS7 -- I don't know about IIS6.  But if I change the URL to:


Then it works (I replaced the plus sign with a hyphen).

At least this is what I'm seeing on my development machine.

Jul 6, 2009 at 10:06 AM

The latest build of BE,, now uses a hyphen in the URL where a space in the author's name exists.

I noticed there was a + sign when using  the Standard theme, but the Mobile and Indigo themes weren't explicitly URL encoding the author name, so when using these themes, the link would have an actual space which turned out to work.  However, now, all 3 of these themes that come with BE are replacing spaces with hyphens.  There shouldn't be any more 404 errors.

Jul 7, 2009 at 7:58 AM


I tried it on XP, with latest build of BE, when clicking on an author name like "Ajay Matharu",. the url is:


The page loads with all the posts whose author is "Ajay Matharu"

This works fine in IE 6, IE 7 and even in FF.


Jul 7, 2009 at 10:49 AM

Hi matharuajay.  The reason that's working is because your theme is not URL encoding the author name.

When I modified BE yesterday for checking in build, I noticed that of the 3 themes (Standard, Indigo and Mobile), only the Standard theme was URL encoding the author name -- e.g. Server.UrlEncode(Post.Author).  This results in + signs where a space would otherwise be -- "Ben+Amada".  The Indigo and Mobile theme weren't doing any Url encoding, so the name in the URL would just be "Ben Amada" or "Ben%20Amada" (these two are the same).  Both of these would work.  It was the + sign that was causing the 404 errors.

In BE, all 3 themes are now using the Utils.RemoveIllegalCharacters() which will change spaces into hyphens.  BE uses the same RemoveIllegalCharacters() function when encoding tags, for example.

So as long as PostView.ascx isn't URL encoding an author's name that has a space in it there won't be any problems.  This problem is in the past with BE -- at least for the themes that come with BE -- we can't be held accountable for what other people might do in their custom themes!  :)

Jul 7, 2009 at 11:58 AM



Yes, of course you are not and should not be held responsible for what other people might do in their custom themes :)

Jul 8, 2009 at 10:49 PM

Hi guys thanks for the comments.

Yes I have a completely custom theme.  Is it easy to modify PostView to use "Utils.RemoveIllegalCharacters()", how do I do it?


Jul 9, 2009 at 1:13 AM

Take a look at how it's done in the latest changeset ...

The anchor tag is:

<a href="<%=VirtualPathUtility.ToAbsolute("~/") + "author/" + BlogEngine.Core.Utils.RemoveIllegalCharacters(Post.Author) %>.aspx"><%=Post.AuthorProfile != null ? Post.AuthorProfile.DisplayName : Post.Author %></a>

I'm not sure what you're theme is doing now, but the important part here is how Post.Author is wrapped in BlogEngine.Core.Utils.RemoveIllegalCharacters() in the HREF attribute.
Jul 9, 2009 at 1:45 PM

Thanks Ben I shall have a look :)