Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
291 stars 204 forks source link

Author selection XHR is slow/not working #855

Closed Fabmilan closed 1 year ago

Fabmilan commented 2 years ago

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 commented 2 years ago

image

rebeccahum commented 2 years ago

@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?

Fabmilan commented 2 years ago

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 ^^

lschuyler commented 2 years ago

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!

Fabmilan commented 2 years ago

:/

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 commented 2 years ago

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

Antonio-Laguna commented 2 years ago

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

lschuyler commented 2 years ago

@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?

Thanks!

Fabmilan commented 2 years ago

@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.

GaryJones commented 1 year ago

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

Fabmilan commented 1 year ago

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 :(

GaryJones commented 1 year ago
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.

Screenshot 2023-07-27 at 09 24 57 Screenshot 2023-07-27 at 09 27 53
Fabmilan commented 1 year ago

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 commented 1 year ago

FYI, here is what I checked and not working:

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 ;)

GaryJones commented 1 year ago

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.