Co-authors plus plug-in
I currently use the co-authors plus plug-in on the CETLS web site. This plug-in does two things that out-of-the-box WordPress does not: 1) it allows you to create guest author profiles and assign guest authors to blog posts; and 2) it allows you to assign multiple authors to a blog post. As you may recall, the plug-in did not work correctly with the CETLS site - I was able to create guest authors and assign them to blog posts, but the guest authors were not displayed on the published posts. You developed a child theme for us with custom code to address this issue.
We're now interested in using this plug-in on OER course hubs that many of our faculty are developing. I am seeing the same issue with all the themes that I have tested (including Customizr and several of the WordPress themes like 2017). Would it be possible to apply the fix you created for Canvas to other themes, or better yet, apply a fix to the plug-in itself so that it works across themes?
#1 Updated by Boone Gorges over 2 years ago
- Category name set to WordPress Plugins
- Target version set to 1.16
The related ticket is https://redmine.gc.cuny.edu/issues/9570
Gina, could I ask you to please spell out very precise details about how to reproduce the issue that you're seeing, along with a precise description of what you expect to see? Author information is displayed in multiple places in a given WP theme, so I want to be sure you and I are looking at the same thing. In the meantime, I'll review #9570 to try to understand what's happening. (It may not be possible to make the plugin work automatically in all themes, but it would likely be possible to create new child themes with the fix.)
#3 Updated by Gina Cherry over 2 years ago
1. Create a guest author profile in Co-Authors Plus
2. Create a new blog post
3. Add the guest author to the post
4. Remove myself as a post author
5. Publish the blog post
What I expect to see: I expect to see the guest author's name displayed on the individual blog post and on the blog archive.
What I do see: In most themes, I see my own name as the author on the published individual blog post and blog archive (though I see the guest author in the editor view). In the Customizr theme, I see a random/unfamiliar name as the post author.
Is that enough detail?
#4 Updated by Boone Gorges over 2 years ago
Thanks, Gina. I'll spend some time in the upcoming month or two looking at Customizr and some of the Twenty themes to see if there's a pattern.
Incidentally, in your testing, did you try enabling the plugin that I mentioned here? https://redmine.gc.cuny.edu/issues/9570#note-4
#5 Updated by Gina Cherry over 2 years ago
Thanks, Boone. I had forgotten that there was also a plug-in. I just tried it and it works with the Twenty themes, but not with Customizr, which is the theme we were hoping to use for the course hub (and possibly change to on the CETLS site). We're not wedded to Customizr, though. Are there other themes that offer a similar level of customizability?
#6 Updated by Boone Gorges over 2 years ago
- File Screenshot_2019-05-24_14-41-50.png Screenshot_2019-05-24_14-41-50.png added
- File Screenshot_2019-05-24_14-42-05.png Screenshot_2019-05-24_14-42-05.png added
Narrowing things down to Customizr helps to make this an easier task.
In my own testing, Customizr seems to work out-of-the-box with Co-Authors Plus. I've attached a few screenshots. Could you look them over and see if I'm doing something different from what you're doing? If you're seeing something different, perhaps you could share screenshots?
#7 Updated by Gina Cherry over 2 years ago
Interesting. Your example had multiple authors and mine did not, so I tried one with multiple authors and got the same result. Here are screen shots of what I see (in this example, Angela Elbanna created the blog post and I added Benjamin Haas as a second author):
#11 Updated by Gina Cherry over 2 years ago
Hi Boone - Just wondering if this is still on your radar. There's a lot of interest in using the Customizr theme for course hubs here, but the Co-Authors plug-in is needed to make it work the way we need it to. Here is one example of the error: https://spe100oerhub.commons.gc.cuny.edu/2019/06/06/tulloch-13/. In order to see it, you'd need to turn on the option to display the author. We currently have it turned off since it's confusing to have an incorrect name displayed. Thanks!
#12 Updated by Boone Gorges over 2 years ago
- Status changed from New to Reporter Feedback
Thanks for sharing the link, Gina. I'm happy to take a look more deeply to try assessing what must be done, but I'm still having a hard time seeing the issue. You say I've got to "turn on the option to display the author", but I'm unsure what this is - I looked through the various Customizer options https://spe100oerhub.commons.gc.cuny.edu/wp-admin/customize.php?return=%2Fwp-admin%2F and I couldn't find anything obvious. Could you please point me in the right direction so that I can see the issue in action?
#14 Updated by Boone Gorges over 2 years ago
- Status changed from Reporter Feedback to In Progress
Thanks, Gina. I can now see what's happening. The high-level overview is:
1. The Customizr theme has its own co-authors-plus support built in (see czr_fn_set_coauthors_compat(), etc)
2. This support is leveraged on an assumption that co-authors-plus "coauthor" IDs correspond to WP user IDs
3. This assumption doesn't appear to be the case
I don't understand enough about Co-Authors Plus to grasp how it's supposed to work - whether this is a bug in the Customizr implementation, or whether there's something about the CAC implementation of co-authors-plus that's causing some sort of mismatch.
I can research this more in the upcoming weeks, but first I wanted to copy Ray in case he has more experience with co-authors-plus that would save me some of the research.
#16 Updated by Raymond Hoh about 2 years ago
- Status changed from In Progress to Staged for Production Release
- Assignee set to Raymond Hoh
- Target version changed from 1.16 to 1.15.8
I was able to duplicate the issue.
The problem is the Customizr theme did not implement its support for the Co-Authors Plus plugin properly.
Fortunately, we can fix this ourselves because the Customizr theme has a filter for the author meta block. I've fixed this here: https://github.com/cuny-academic-commons/cac/compare/4d46567...5117ecc
I also fixed some issues in Customizr with guest author data not showing correctly when on a guest author archive page.
Gina, these fixes will be part of the August 27th release.