Author Link Doesn't Work
-
Hi,
I have a contributor page set up with a bunch of bio boxes. Everyones’ WordPress / Author links work (WordPress symbol or clicking on name) except for mine.
page: http://mudandadventure.com/contributors/
broken contributor: Paul Buijs link: http://mudandadventure.com/author/Paul%20Buijs/
associated user name: Paul BuijsWhat should I check to try and fix this? Any ideas?
As always, thanks for your help!!
-
Hi Paul,
How are you creating the Biography Boxes on the contributors page? With a shortcode or a template tag? Also, what is your Display Name Publicly As set to in your profile and, if you’re using the shortcode/template tag arguments, how have you specified your name to be formatted for the Biography Box?
-Gary
Hi Gary,
I am using the short code [wp_biographia user=”Paul Buijs”] to the list profile box on that page.
Display Name Publicly As is set to Paul Buijs (same as nickname field). I only used the shortcode described above. No tag arguments.
I even created a new admin user deleted my old profile and tried it with the new profile.
http://mudandadventure.com/author/Paul%20Buijs/ still does not work.
I think the problem may be either that you’re using your Display Name for the shortcode’s
userattribute, rather than your login name (see the shortcode’s documentation at http://www.vicchi.org/codeage/wp-biographia/4-shortcode-usage-and-support/) or that your login name has spaces in it, which sometimes throws a theme’s permalink redirects into confusion.If your login name is different from your display name, trying using that in the shortcode, along the lines of
[wp_biographia user="login-name"].-Gary
Hi Gary, thanks for the quick response. login name and display name are both Paul Buijs . This thing has me stumped. Several of the other bio boxes on that page have spaces in the name but their author page links work fine.
I figured if there was some database corruption that would have been solved by me creating a new user and attributing my old user’s posts to the new user. I also checked my redirection plugin to see if I may have redirected my author link at some point but no.
So this is very odd.
I’ve done some research and while WordPress does support login names with spaces in them, general consensus on the forums is that this isn’t a good idea. Although the WordPress core does the right thing, there’s no guarantee that themes or plugins don’t make assumption about login names.
But having said that, I’ve done some testing and can’t seem to replicate this. What I’ve done is, in addition to my account which is
gary, I’ve created two accounts, both with spaces and with differences in case, so there’sUpper Caseandlower case(not the most imaginative of names I know).On a locally hosted WordPress install (
localhost:8888) I’ve created test posts for both these new accounts, disabled all plugins (except WP Biographia) and used a stock WordPress theme (TwentyTen in this case).I’ve also created a Contributors page, with the following shortcodes …
[wp_biographia user="gary"] [wp_biographia user="Upper Case"] [wp_biographia user="lower case"]For each post, the theme uses the WordPress
get_author_posts_urlAPI call. This API call builds a URL to the author’s archive page in the form of[host[:port]][prefix][/author][/user]. So for mygaryaccount, the URL ishttp://localhost:8888/author/gary/. But the API call also detects login names with spaces in them and replaces the spaces with the-character and lower cases the remainder of the login name, so for theUpper Caseuser the URL ishttp://localhost:8888/author/upper-case/and for thelower caseuser the URL ishttp://localhost:8888/author/lower-case/.This all works as it should and the author archives for all the users, when accessed via the theme’s links, display correctly. As does my mocked up Contributors page.
WP Biographia uses the same API call and thus, this also works.
So there’s something on your site, either in your WordPress setup, in your theme or in a plugin which isn’t working correctly. Interestingly enough, although
http://mudandadventure.com/author/Paul%20Buijs/generates a 404 error, if I manually fix up the URL to what WordPress should support, as inhttp://mudandadventure.com/author/paul-buijs/, this also 404s, which isn’t what I’d expect.From this, I don’t think there’s an issue with WP Biographia’s handling of login names with spaces in them. At least, I’ve been unable to replicate this using the current released version of the plugin. So I think the answer may lie elsewhere.
What I’d suggest is that you firstly revert to a stock WordPress theme, any of the Twenty series should be fine and disable all plugins. Check the author archive links that this theme generates. Do they look as they should (all lower case and
-separated) as I’ve described above?If this works, then re-enable WP Biographia and re-test. What happens?
If this works, re-enable each plugin you have and re-test after you’ve enabled each plugin. What happens?
Finally, revert to your custom theme and again, re-test.
I appreciate that this is a laborious process, but it’s the best (and probably only) way to narrow down the source of the problem.
-Gary
Haven’t heard back from you in over 2 weeks so I’m assuming this is sorted on your side and I’m flagging this as resolved; feel free to re-open and re-post if this isn’t the case.
-Gary
Hi Gary,
Sorry about that. Yeah I changed my username so it didn’t have a space and that fixed it. Strange because almost all my other uses have spaces in their user names but it only affected me. Maybe because I am the admin. Who knows. Resolved.
Thanks as always for your support and quick response!
The topic ‘Author Link Doesn't Work’ is closed to new replies.