You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When looping through the authors object, if the author is a guest author, {{author.link}} should return either the guest author 'website' meta value or be blank, as they do not have a typical WordPress author page.
Actual behavior
{{author.link}} returns an incorrect (non-existent) WordPress author URL for guest authors.
Steps to reproduce behavior
Create a guest author in Co-Authors Plus and assign it as coauthor to a post.
In the template:
{% for author in post.authors %}
<a href="{{author.link}}">{{author.name}}</a>
{% endfor %}
{{author.link}} will return something like '/blog/author/authorname' where authorname is a non-existent user.
What version of WordPress, PHP and Timber are you using?
WordPress 4.7.3, PHP 7.0.3, Latest Timber from GitHub
As a temporary fix, I added a conditional to CoAuthorsPlusUser.php:
Which is an improvement but still returns an incorrect link if the $coauthor->website value is empty. I tried setting $this->_link to null when $coauthor->website is empty, but that still returns the author permastruct.
The text was updated successfully, but these errors were encountered:
Expected behavior
When looping through the authors object, if the author is a guest author,
{{author.link}}
should return either the guest author 'website' meta value or be blank, as they do not have a typical WordPress author page.Actual behavior
{{author.link}}
returns an incorrect (non-existent) WordPress author URL for guest authors.Steps to reproduce behavior
Create a guest author in Co-Authors Plus and assign it as coauthor to a post.
In the template:
{{author.link}} will return something like '/blog/author/authorname' where authorname is a non-existent user.
What version of WordPress, PHP and Timber are you using?
WordPress 4.7.3, PHP 7.0.3, Latest Timber from GitHub
As a temporary fix, I added a conditional to CoAuthorsPlusUser.php:
Which is an improvement but still returns an incorrect link if the $coauthor->website value is empty. I tried setting $this->_link to null when $coauthor->website is empty, but that still returns the author permastruct.
The text was updated successfully, but these errors were encountered: