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

Attempted fixes for #1117, where post_author twitter account is used instead of coauthor #1118

Merged
merged 3 commits into from
Feb 7, 2016

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Feb 3, 2016

This PR is a shot in the dark. I don't know why the behavior described in #1117 is happening.

Changes

  • makes sure that $via is '' before trying to use the post_author's Twitter handle
  • Doesn't display the post_author's Twitter handle in the "More" social menu if Co-Authors Plus is present and active.

Why

Because #1117 and http://jira.inn.org/browse/WE-87

@benlk
Copy link
Collaborator Author

benlk commented Feb 3, 2016

Tried to replicate with http://womensenews-largoproject-org.largoproject.staging.wpengine.com/2016/01/test-partners-post/

  • created by user benlk with the twitter username benlkeith
  • guest author alexandra-muck with twitter username testuser
  • site twitter user set to http://twitter.com/womens_enews

Not reproducing the bug. :(

@aschweigert
Copy link

did we try clearing the cache on production?

@benlk
Copy link
Collaborator Author

benlk commented Feb 4, 2016

Note for the future:

What we think happened here was that Co-Authors Plus' query for author pages was cached.

if ( function_exists( 'coauthors_posts_links' ) && !isset( $values['largo_byline_text'] ) ) {
    $coauthors = get_coauthors( $post->ID );

If that query is cached, then the author objects returned are wrong, and therefore the twitter handle returned is wrong, and therefore the "via" text is wrong.

So the solution is to reset the cache on production.

@benlk
Copy link
Collaborator Author

benlk commented Feb 4, 2016

I think we should still merge this fix, because it does prevent the wrong Twitter handle from being output in the "More" menu.

@benlk benlk added this to the 0.5.5 - Story Elements milestone Feb 4, 2016
aschweigert added a commit that referenced this pull request Feb 7, 2016
…al-links

Attempted fixes for #1117, where post_author twitter account is used instead of coauthor
@aschweigert aschweigert merged commit 876da0d into master Feb 7, 2016
@aschweigert aschweigert deleted the 1117-twitter-guest-author-post-social-links branch February 7, 2016 18:04
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 this pull request may close these issues.

None yet

2 participants