Co-Authors-Plus icon indicating copy to clipboard operation
Co-Authors-Plus copied to clipboard

Co Authors not working anymore

Open Fabmilan opened this issue 2 years ago • 9 comments

Hey there!

I don't know why, but your plugin has stop working. I can't change author (the field is disabled) and the autocomplete input field (Select An Author) not working anymore.

I have been using your plugin for 1 year and everything was working fine until then. Did you change something ?

Thx.

Fabmilan avatar Jun 08 '22 08:06 Fabmilan

image

Fabmilan avatar Jun 08 '22 08:06 Fabmilan

@Fabmilan Do you have more details? What Co-Authors Plus version are you currently using? Was this after the latest update? What WordPress version are you running?

rebeccahum avatar Jun 08 '22 14:06 rebeccahum

Hey thx for the reply. I'm using the latest version of Co-Authors Plus 3.5.2 / Wordpress 6.0

In fact, the plugin is working, it is just the xhr who is very very slow and that gives me the authors (or users account), not co-authors :/

I don't know what happens here ^^

Fabmilan avatar Jun 09 '22 08:06 Fabmilan

Hi @Fabmilan,

I've been unable to replicate this. Are there any corresponding errors showing in your browser's JavaScript console that could lend any clues as to why you are experiencing that author field as disabled?

Also, are what version of PHP?

Thanks!

lschuyler avatar Jun 13 '22 20:06 lschuyler

:/

I do not have any JS error, like i said, the xhr request is working properly but I just can list user (classics users) and not co-authors. When I enter the name of a co-author user, the request didn't show co-authors. If I enter the name of a "real" user, it shows.

Did you change something in the xhr request ? Why are the co-authors no longer displayed?

I'm using PHP Version 7.4.15

Thx

Fabmilan avatar Jun 20 '22 09:06 Fabmilan

I'm not the only one with this issue see plugin reviews: https://fr.wordpress.org/plugins/co-authors-plus/#reviews

Fabmilan avatar Jun 20 '22 14:06 Fabmilan

I reckon this could be related to this https://github.com/Automattic/Co-Authors-Plus/pull/851

Antonio-Laguna avatar Jun 20 '22 15:06 Antonio-Laguna

@Fabmilan - We are still working to replicate your experience so we can fix this. Could you tell us a bit more about your Co-Authors Plus setup?

  • Do you have terms in place for all authors? (Have you run the create-terms-for-posts CLI?)
  • Or are you relying on the guest-author custom post type?
  • Are you using the coauthors_plus_should_query_post_author or coauthors_count_published_post_types mentioned in the FAQ? https://github.com/Automattic/Co-Authors-Plus#frequently-asked-questions
  • Are your co-authors linked to WordPress user accounts?

Thanks!

lschuyler avatar Jul 05 '22 22:07 lschuyler

@Fabmilan - We are still working to replicate your experience so we can fix this. Could you tell us a bit more about your Co-Authors Plus setup?

  • Do you have terms in place for all authors? (Have you run the create-terms-for-posts CLI?)
  • Or are you relying on the guest-author custom post type?
  • Are you using the coauthors_plus_should_query_post_author or coauthors_count_published_post_types mentioned in the FAQ? https://github.com/Automattic/Co-Authors-Plus#frequently-asked-questions
  • Are your co-authors linked to WordPress user accounts?

Thanks!

Nothing you ask me is used. I talk about the back office not the front office.

This part of the plugin "Multiple authors can be added to a Post, Page, or Custom Post Type using an auto-complete interface." doesn't work anymore.

I installed the plugin, create guests authors and now, like before the update that broke the plugin, I want to add guests users to native Wordpress posts. So I use the co-authors block on the right side column and start to tapying the firsts letters of an guest user. As a result, the request (xhr) is very very long and doesn't show me guest author but editors users instead.

Fabmilan avatar Jul 06 '22 07:07 Fabmilan

@Fabmilan Can you please check if this is still the case with 3.5.11?

GaryJones avatar Jul 26 '23 16:07 GaryJones

Hello @GaryJones,

I'm sorry, but it is not working. I have a guest author called Sandra I begin to type San or san even Sandra or sandra... but nothing shows up :(

Fabmilan avatar Jul 27 '23 06:07 Fabmilan

Screenshot 2023-07-27 at 09 21 06

You may have a plugin conflict, or the REST API responses may be blocked. I'm going to need more information.

  • Do you see any JavaScript errors in the browser developer console?
  • Can you recreate the issue on a non-production site, and deactivate the other plugins and use a core theme to check?
  • Can you please also confirm your PHP, WP, and plugin versions?
  • Can you see XHR requests being made (Network tab of the console) when you type each character? Do they have responses?
Screenshot 2023-07-27 at 09 24 57 Screenshot 2023-07-27 at 09 27 53

GaryJones avatar Jul 27 '23 08:07 GaryJones

  • Do you see any JavaScript errors in the browser developer console? No

  • Can you recreate the issue on a non-production site, and deactivate the other plugins and use a core theme to check? I tested in a sandbox and it works... Good call.

  • Can you please also confirm your PHP, WP, and plugin versions? 7.4 / 6.2.2 / 3.15.11

  • Can you see XHR requests being made (Network tab of the console) when you type each character? Do they have responses? I have the XHR request but response is empty :/ This endpoint is called : https://www.1jour1actu.com/wp-json/coauthors/v1/search/?q=san&existing_authors=admin-milan&_locale=user And I have this response : {"code":"rest_forbidden","message":"D\u00e9sol\u00e9, vous n\u2019avez pas l\u2019autorisation de faire cela.","data":{"status":401}}

The role of the user calling this route is Administrator.

API REST works for this website : https://www.1jour1actu.com/wp-json/wp/v2/posts

I have no clue of what is going on :D

Thank you for your help

Fabmilan avatar Jul 27 '23 12:07 Fabmilan

FYI, here is what I checked and not working:

  • Desactivate all plugin (except coauthor of course :) )
  • Delete all plugin
  • Delete my current theme (to not have specific functions.php)
  • Use twentythree theme

And with a fresh install (WP 6.2.2, basic + coauthors), it works.

I'm thinking, is something in the database (eg: wp-options) could go wrong with api-rest ?

thx again ;)

Fabmilan avatar Jul 27 '23 15:07 Fabmilan

The JSON response suggests it's an authorisation thing. The request headers should include a nonce. Maybe one of your other plugins is amending that nonce, or doing something that makes the login cookie invalid. At this point, you'll need to enable your plugins and theme one by one to narrow down further what the culprit is.

(If you try to hit the REST API endpoint in a browser directly, then it's expected to fail as that request won't include the nonce.)

From a CAP point-of-view, the plugin is working, so I'm going to close this issue out but feel free to add more information on what you find if you can pinpoint the source of the problem.

GaryJones avatar Jul 27 '23 18:07 GaryJones