Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author vicchi

    (@vicchi)

    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

    Thread Starter Paul Buijs

    (@paulbuijs)

    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.

    https://mudandadventure.com/author/Paul%20Buijs/ still does not work.

    Plugin Author vicchi

    (@vicchi)

    I think the problem may be either that you’re using your Display Name for the shortcode’s user attribute, rather than your login name (see the shortcode’s documentation at https://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

    Thread Starter Paul Buijs

    (@paulbuijs)

    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.

    Plugin Author vicchi

    (@vicchi)

    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’s Upper Case and lower 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_url API call. This API call builds a URL to the author’s archive page in the form of [host[:port]][prefix][/author][/user]. So for my gary account, the URL is https://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 the Upper Case user the URL is https://localhost:8888/author/upper-case/ and for the lower case user the URL is https://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 https://mudandadventure.com/author/Paul%20Buijs/ generates a 404 error, if I manually fix up the URL to what WordPress should support, as in https://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

    Plugin Author vicchi

    (@vicchi)

    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

    Thread Starter Paul Buijs

    (@paulbuijs)

    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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Author Link Doesn't Work’ is closed to new replies.