WordPress.org

Ready to get started?Download WordPress

Forums

Author page is not being found (24 posts)

  1. douglerner
    Member
    Posted 2 years ago #

    The author page URL, for example http://mydomain.net/author/DougLerner/ is always returning a page not found page.

    This is an issue because the author links in both the web UI and in the Jetpack notifications are invalid.

    Is there a setting perhaps that I need to enable the author page to show?

    Thanks,

    doug

  2. Arie Putranto
    Member
    Posted 2 years ago #

    Can you access it by using query string (e.g. /?author=1)?

  3. douglerner
    Member
    Posted 2 years ago #

    Unfortunately not. If I enter it by query string:

    http://mydomain.net/?author=1

    all it does is redirect to that URL in my post above, which doesn't seem to exist.

    doug

  4. Can you provide the link to your site, so we can check and see what's going on?

  5. douglerner
    Member
    Posted 2 years ago #

    Hi, Christine.

    The URL is http://douglerner.net.

    Most of the content is imported from wordpress.com except for a few test posts I made the last few days.

    Until this morning I was running the twenty eleven theme. But somebody said it looked like the problem was that the author was not being credited with the posts. That appeared to be just a twenty eleven theme problem, so I just switched to another theme, and it is showing the authors name (me) by each post now. So that wasn't the issue.

    Thanks very much!

    doug

  6. Arie Putranto
    Member
    Posted 2 years ago #

    I'm afraid your rewrite_rule is broken.
    Try to disable redirect_canonical by adding:

    remove_filter('template_redirect', 'redirect_canonical')

    on your functions.php, and check again the author page by query string.

    If it still doesn't work, maybe you can check out the permalink rewrite rules:

    Remove above codes from the functions.php first, and open your header.php, add right after <?php

    print_r( $wp_rewrite ); exit();

    save and reload any page, it will print out the $wp_rewrite object like this:

    WP_Rewrite Object
    (
        [permalink_structure] => /blog/%postname%/
        [use_trailing_slashes] => 1
        [author_base] => author
        [search_base] => search
        [comments_base] => comments
        [pagination_base] => page
        [feed_base] => feed
        [comments_feed_structure] =>
        [feed_structure] => feed/%feed%
        [front] => /blog/
        [root] =>
        [index] => index.php
        [matches] =>
        [rules] => Array

    Copy and paste the result somewhere else. Don't forget to delete the above code afterward.

    Check on these line:

    [rules] : is there something like 'author/'?

  7. douglerner
    Member
    Posted 2 years ago #

    I've never edited WP code before. This would be in the actual WP code itself?

    I was running 3.3.x until yesterday (it was broken then) and I upgraded to 3.4 today, and it's still broken.

    Won't modifying the code interfere with upgrades?

    Is this a general WP bug?

    How would my own rewrite rule have gotten changed?

    Thanks,

    doug

  8. douglerner
    Member
    Posted 2 years ago #

    Also, if you mean the rewrite rule for the query URL, that won't help because the author links on the web page itself look like http://douglerner.net/author/Doug%20Lerner/ - which is different from both the Jetpack notification author URL (the query URL) and the URL the query URL gets redirected to:

    1. On the blog page: http://douglerner.net/author/Doug%20Lerner/ (bad URL)

    2. In the Jetpack notification: http://mydomain.net/?author=1 (gets redirected to http://mydomain.net/author/DougLerner/ which is also a bad URL.

    doug

  9. Arie Putranto
    Member
    Posted 2 years ago #

    Nope, what I have given is dealing with the theme only, not the core. So, the file I have mentioned is on the ./wp-content/themes/<your theme folder>.

    AFAIC, rewrite rules may have changed by plugins without notice. Usually, by saving permalink options from Setting > Permalink will reload the proper permalink except if the plugin which caused the problem is still activated.

    So, maybe you can check by deactivating plugins first, and re-save the permalink setting. See if it works.

  10. Arie Putranto
    Member
    Posted 2 years ago #

    Redirection from http://mydomain.net/?author=1 to http://mydomain.net/author/DougLerner/ is done by WP by running the redirect_canonical() function on 'template_redirect' hook. That's why I suggest to deactivate it first to see if the author page is accessible from http://mydomain.net/?author=1.

    If it's accessible, then it's permalink problem. If it's not, then we have to find somewhere else that might be the problem.

    That's just how I debug this kind of problem.

  11. douglerner
    Member
    Posted 2 years ago #

    I see.

    The easiest thing to test seemed to be the permalink settings. So I have tried this:

    1. I changed to the "default permalink" setting (first radio button). That works! The author links are now the query URL format with no redirection and the page shows correctly!

    2. I then tried with my preferred option, the 2nd radio button: http://douglerner.net/2012/06/15/sample-post/. That's a much nicer format. But unfortunately the same problem occurs again.

    So it looks like a problem with the permalink options, wouldn't you say?

    Anyway, since choosing the first option works I will just use that for now.

    Thanks very much!

    doug

    p.s. Would I call this "resolved"? I'm not sure. It's a work-around, but exposes a different bug.

  12. douglerner
    Member
    Posted 2 years ago #

    Agh!!!!

    It started redirecting again. This time to a general 404 error.

    Why?

    doug

  13. Arie Putranto
    Member
    Posted 2 years ago #

    I can see that http://douglerner.net/?author=1 works just fine. What was then redirecting to 404?

    Also, I'm thinking about the .htaccess configuration. Can you provide me with it? Just copy and paste the content of .htaccess file (which is on your server root) here so I can check?

  14. douglerner
    Member
    Posted 2 years ago #

    Arie,

    It must have been a caching thing with Chrome. I noticed the query URL was not redirecting from within Safari. Then I cleared my Chrome cache and it wasn't redirecting either.

    So I think I'll not fiddle with the permalinks right now.

    It does seem to be a permalink bug, wouldn't you say?

    Thanks again.

    doug

  15. douglerner
    Member
    Posted 2 years ago #

    It's a shame though, because the query URL is the least user friendly format.

    doug

  16. Arie Putranto
    Member
    Posted 2 years ago #

    Yeah, it is possibly permalink/rewrite rules. And indeed query URL is not user friendly format.

    As far as I know, permalink problem can be caused either by plugins or .htaccess file.

    I'm curious to what plugins you have activated. If I may know, maybe I can figure out what plugin which may cause the permalink problem. Have you tried to deactivate them and re-activate the other permalink options?

  17. Arie Putranto
    Member
    Posted 2 years ago #

    You're welcome anyway, Sir. But I'm still curious about what may caused the problem ... :)

  18. douglerner
    Member
    Posted 2 years ago #

    My activate plugins are:

    1. Akismet - for spam protection.

    2. Auto-hyperlink URLs - if this is not installed, ordinary URLs I entered were not getting hyperlinked.

    3. Jetpack - mainly for the subscriber and email notification features.

    4. Jquery archive list widget - a nicer, collapsible archive widget.

    5. Postie - needed for post via email. It is not doing URL conversion.

    6. Ultimate tag cloud widget - it is a nicer, smaller font tag cloud than the default.

    7. WordPress importer - I used it to import from wordpress.com but I guess it's not doing anything now.

    That's all.

    I have not tried deactivating them, but I can try.

    Thanks,

    doug

  19. Arie Putranto
    Member
    Posted 2 years ago #

    Hmm, actually, none of the plugin is dealing with permalink structure, but you can try to deactivate jetpack, switch to default Twenty Eleven theme, and then try to use 'pretty permalink' again. See if it works.

  20. douglerner
    Member
    Posted 2 years ago #

    Remember though, the author link or name isn't even shown in twenty eleven. That's why I changed themes for testing.

    doug

  21. Arie Putranto
    Member
    Posted 2 years ago #

    Well, you can delete your .htaccess file and let WordPress create it again automatically and see if it solved.

    Or, maybe you can try upgrade to 3.4 and see if the problem persist. I see that you are still using 3.3 right?

  22. douglerner
    Member
    Posted 2 years ago #

    I upgraded to 3.4 this morning hoping it might fix the problem. I'll try the other things you recommended when I get back from the store.

    Thanks!

    doug

  23. douglerner
    Member
    Posted 2 years ago #

    Arie,

    The contents of the .htaccess file just had comments in it:

    # BEGIN WordPress

    # END WordPress

    In the meantime I guess I'm stuck with query URLs.

    Unless somebody has any additional thoughts?

    Thanks,

    doug

  24. Ryan Mendenhall
    Member
    Posted 1 year ago #

    Hey Doug...I'm not sure if you already fixed this, but here's the problem & solution:

    http://graemewilson.co.nz/wordpress-authors-page-404-page-not-found-error/

Topic Closed

This topic has been closed to new replies.

About this Topic