• Resolved jonzornow

    (@jonzornow)


    Hello,

    A client, who uses your plugin, has asked me to look into some disappearing posts in their Author archives. (At least the full year of 2012 is missing from the list.) I’ve confirmed that the posts returned by wp_query is also missing the posts is question, and through some experimentation with the query have identified the “HAVING MAX( […] ) <> 1” clause as the problem. (At least, I’ve discovered that when I delete this clause from the query, we’re getting all the missing posts).

    I believe this clause is added by the “posts_groupby_filter” function on line 585 of the plugin’s main page, but figured it would be worth running by you before I spent too much time reverse engineering your plugin.

    Have you come across this issue before? Do you have any recommendations for how I can restore the archives, and prevent this from happening again? Any help would be appreciated. ?? Thanks!

    https://www.ads-software.com/extend/plugins/co-authors-plus/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    Can you see if hitting “Update” on one of posts owned by the author fixes it? If so, I think I have an idea of what it might be.

    Thread Starter jonzornow

    (@jonzornow)

    Thanks for the quick response!

    I’m afraid hitting ‘update’ didn’t do it.. I did notice though, while attempting this, that the Author’s field in the edit post page is empty. However, the post’s row in the wp_posts table is correctly attributed.

    That’ll solve the problem of fixing it retroactively, but any idea what caused it in the first place?

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    Odd. Does this problem affect all users or just specific ones? Do you think it could be this problem? Can you share some screenshots of what you’re seeing?

    Thread Starter jonzornow

    (@jonzornow)

    It definitely affects multiple users, but one user on the site is responsible for the majority of the activity, so it’s difficult to say if any users are unaffected.

    I tried the steps discussed in the other thread, and I believe we’re getting closer – When I set the user’s slugs to match the user_nicename, there is no effect. (I’m just changing the normal term slug and the cap-* slug in the wp_terms table, right?)

    I’m running through all the various permutations of the login, nicename, and slugs, so far I’ve found that if I set the login, nicename, and slug to the login, and the cap-slug to the nicename, that all of the posts are appearing correctly. The nicenames in the user URLs are pretty important, so I don’t think this fix would work for anything other than debugging purposes. (We could change the login’s to match the nicenames, but during experimentation it looks like that doesn’t solve the problem.)

    All of the other permutations I’ve tried so far leave me with the original state with missing posts, show me the missing posts but exclude all the posts that were being shown otherwise, or the following problem, which has occurred with a number of the combinations:

    As an example, when I set the slugs to match the login, but leave the nicename as it was, I get the missing posts, but all the posts are duplicated many times in the archives. (For one post as an example, viewing the wp_posts table directly, I see one published row and four revisions. Viewing the archive page, I see 11 versions of the same post printed.)

    Sorry if this is getting a little convoluted – Thanks for all the help!

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    As an example, when I set the slugs to match the login, but leave the nicename as it was, I get the missing posts, but all the posts are duplicated many times in the archives.

    Aha! That’s actually a different bug. Can you try downloading the current working version from Github and letting me know if that fixes things?

    If it doesn’t, can you share some sample data (e.g. what these user logins, nicenames, and author terms are)?

    Thread Starter jonzornow

    (@jonzornow)

    Yep – The latest version, along with the DB edits, seems to have fixed the problem! Thanks for all your help!

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    Cool, happy to help

    Peter Level

    (@peter-level)

    Hi, a client is using this plugin for a few years now and we are experiencing similar problems. I’m not sure if it’s the same issue but the effects are almost the same.
    The problem I have is that an author archive shows that there are 10 posts written by the author but only shows 4 in the loop.
    When I open an article written by this author but is missing on the author page I see that the author information is incomplete.

    Before reading this topic I was digging into the database and I saw that the posts which are not visible on the author page seem to miss a relation between the post (object_id) and the author (term_taxonomy_id) in the table wp_term_relationship as well.
    I now have a script that checks if a certain relation excists and if not, add one. This will be a pretty heavy script and before excecuting I’d like to know if there is an easier solution that this.

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    @peter are you running 3.0.5?

    Peter Level

    (@peter-level)

    I was running 3.0.5 but now I’m running 3.1

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    Er, which version of Co-Authors Plus?

    We only support down to WordPress 3.3. If you’re running older than that, I’d highly recommend you upgrade to the latest version.

    Peter Level

    (@peter-level)

    Sorry, got confused with the version numbers. WordPress is up to date (3.5.1) and I’m now using the 3.1-working version of Co Author Plus I found here: https://github.com/Automattic/co-authors-plus

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Missing author archives’ is closed to new replies.