Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling CAP causes non-guest-authors who have authored posts to show different post counts (WordPress 4.9.2) #494

Closed
lidocaine opened this issue Mar 21, 2018 · 2 comments · May be fixed by #502
Assignees

Comments

@lidocaine
Copy link

Originally mentioned in Issue #470 by @benlk

...in WordPress 4.9.2. Enabling CAP causes non-guest-authors who have authored posts to show different post counts...

and

With CAP enabled, nkhan has 248 posts listed at /wp-admin/users.php. With CAP disabled, nkhan has 385 posts - is this because the posts created by nkhan but filed under a different byline are being excluded from nkhan's post count in the users table? If it is, that's not a problem.

Possibly related to Issues #447 and #231

@jeherve
Copy link
Member

jeherve commented Apr 11, 2018

I was able to reproduce this, but I believe this is done on purpose: CAP unsets the default post count in that column and replaces it with its own count since this changeset:
https://plugins.trac.wordpress.org/changeset/479608/

CAP' custom post count happens here:
https://github.com/Automattic/Co-Authors-Plus/blob/3.2.2/co-authors-plus.php#L937-L952

If a user has a linked guest author, the post count is updated to return the number of posts by that guest author instead of showing the number of posts by the default user.

I can see how this could be confusing though. Maybe we should be more clear about the contents of that column when CAP is active? One way we could make it clearer would be to add a new column to the Users table, that would list guest authors when there are some.

I've opened #502 to make that suggestion. I'd be happy to hear feedback to see if this makes things less confusing, or if there are other things we could do to make thing less confusing.

@philipjohn
Copy link
Contributor

Yep, this is expected. We've had issues with this count being wrong, but it definitely should change when a user is a co-author on posts too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants