Forum Replies Created

Viewing 15 replies - 1 through 15 (of 150 total)
  • Plugin Contributor Gary Jones

    (@garyj)

    Thanks @alithewpdev, the stack traces have made the cause clear. This is a stale-JS issue on the Kinsta side, not a code defect in 4.0.x.

    The first error, Uncaught TypeError: $co.attr(…).appendTo(…).suggest is not a function at co-authors-plus.js:174, is the legacy admin script trying to call .suggest(). We removed that call in 4.0.0 (commit 6d1cf8b, where we replaced the deprecated WordPress suggest library with jQuery UI autocomplete). The function name in your stack trace, coauthors_create_autosuggest, was also renamed to coauthors_create_autocompletein the same 4.0.0 change. So the JavaScript file your browser is executing is from a pre-4.0.0 version of Co-Authors Plus, even though your installed plugin is 4.0.x.

    The second React error, Cannot read properties of undefined (reading 'PluginDocumentSettingPanel')at index.js, is consistent with the same problem: the bundled editor script being served is also from an older build that doesn’t have the fallback for the PluginDocumentSettingPanel API move (it shifted from wp.editPost to wp.editor in WP 6.6).

    Kinsta’s CDN, like Cloudflare, will often cache static assets while ignoring query-string cache busters such as ?ver=4.0.x. Once the CDN edge has cached the pre-4.0 file, a plugin upgrade alone won’t refresh it.

    Two things to try, in this order:

    1. Clear Kinsta’s CDN cache and the site’s object cache. From MyKinsta, go to your site → Cache → Clear Cache, and also clear the object cache. (We had another report this week that resolved entirely after clearing Cloudflare’s cache.)
    2. Hard-refresh the browser (Cmd+Shift+R on macOS / Ctrl+F5 on Windows) so it doesn’t reuse a stale local copy either.

    If the errors persist after that, please share a fresh console capture and we’ll dig further. I’d be especially interested in whether co-authors-plus.js is still serving from coauthors_create_autosuggest, or whether it now shows coauthors_create_autocomplete (which is the correct name in 4.0+).

    Plugin Contributor Gary Jones

    (@garyj)

    The dropdown populating means the /coauthors/v1/search/ endpoint is fine and the search-as-you-type wiring works. The “selecting does nothing” symptom points at the onChange handler in src/components/co-authors/index.jsx:104-112, which calls addItemByValue() and then updateAuthors(). If either silently fails, you’d see exactly this — search works, selection no-ops.

    Most plausible causes, in rough order of likelihood:

    • Stale bundled JS cached by CDN/browser that doesn’t match the current REST API shape (the coauthorTermIds/buildCoauthorTermIds rework in a recent PR changed the entity store contract; old JS would break here silently).
    • A JS error mid-onChange that’s only visible in the console.
    • A third-party plugin filtering the REST search response to omit termId or userNicename, which would make addItemByValue find nothing and silently no-op.

    @egonzaleztest Please can you share your WP version, the full console error with stack trace, the active plugins, and whether your site has a CDN and/or object cache?

    Plugin Contributor Gary Jones

    (@garyj)

    The error message “The ‘plugin-coauthors-document-setting’ plugin has encountered an error and cannot be rendered”is Gutenberg’s standard error boundary message when a registerPlugin panel throws during render. So this is our React component (src/components/co-authors/index.jsx, registered via src/index.js) crashing on mount.

    @alithewpdev Please can you share your WP version, the full console error with stack trace, the active plugins, and whether your site has a CDN and/or object cache?

    Plugin Contributor Gary Jones

    (@garyj)

    Glad to hear it’s sorted. Thanks for following up — that’s a useful data point. Stale CDN-cached copies of co-authors-plus.js from a pre-4.0 release would explain the throw, since the response shape from the suggest endpoint changed between major versions and the older script doesn’t know how to parse the newer payload. I’ll keep that in mind for similar reports going forward.

    Plugin Contributor Gary Jones

    (@garyj)

    Thanks, that narrows it down considerably. If switching to Twenty Twenty-Five didn’t fix it, the conflict is on the plugin side rather than the theme side. Three things would help, and none of them require deactivating anything on your live site:

    1. The list of active plugins. You can grab it from Plugins → Installed Plugins, or, if you have WP-CLI access, wp plugin list --status=active --field=name. With that I can check whether anything obvious filters the REST author lookup or post-save flow.
    2. Whether the site uses a persistent object cache. Redis, Memcached, or any caching plugin in that category. You can check from Tools → Site Health → Info → Constants, or via WP-CLI with wp eval 'echo wp_using_ext_object_cache() ? "yes" : "no";'. This matters because the post_author re-sync happens immediately before the REST response is sent, and certain object caches can serve a stale get_post()to the code that does the sync.
    3. If you have access to a staging copy, or a tool like the Health Check & Troubleshooting plugin’s Troubleshooting Mode, you can deactivate other plugins only for your own admin session without affecting other visitors at all. That would let you run the bisect safely on production. Activating Troubleshooting Mode → disable all plugins → reactivate Co-Authors Plus only → repeat the publish flow. If that fixes it, you can then re-enable plugins one by one in the same Troubleshooting session to find the culprit.

    Quick Edit remains a safe workaround in the meantime.

    Plugin Contributor Gary Jones

    (@garyj)

    Thanks for the help so far. I’ve tried to reproduce this on a clean WordPress 6.9.4 site running Co-Authors Plus 4.0.2 with the Twenty Twenty-Five theme and no other plugins, going through the same flow you described, and wp_posts.post_author is correctly updated to the chosen author after publish. So I think there’s something in your specific environment that’s interfering with the sync.

    A few things that would help me narrow it down:

    1. The list of all active plugins on the site.
    2. Whether the site uses a persistent object cache (Redis, Memcached, or a plugin like W3 Total Cache, Redis Object Cache, etc).
    3. If you switch to a default theme like Twenty Twenty-Five and repeat the publish flow with no other changes, does the bug still occur?
    4. If yes to point 3, with the default theme active, does deactivating every other plugin except Co-Authors Plus and repeating the flow still reproduce the bug?

    Quick Edit will continue to work as a reliable workaround in the meantime.

    Plugin Contributor Gary Jones

    (@garyj)

    Thanks for the report @cmurphy124, and especially for capturing the console error — that narrows it down considerably.

    This looks like a different issue from a couple of other reports we’ve had this week, so I’d like to track it separately. To do that, a few things would help:

    1. The full stack trace from the browser console (expand the error so we can see the file and line number it was thrown from). The minified b.split reference on its own is hard to map back to source.
    2. The response body from the network request to /wp-json/coauthors/v1/search/?q=… when you try to search. If any rows in that response are missing a userNicenameid, or have null where a string is expected, that would explain the throw.
    3. Whether the same site reproduces the error on a single-site WordPress install, or only on multisite. If you are able to test on a non-multisite staging environment, that would help isolate it.
    4. Whether you have any plugins that filter coAuthors.formatAuthorData.label, or any custom code that filters the search endpoint response.

    You mentioned this first appeared after upgrading to 4.0.1, which lines up with the editor panel rewrite in 4.0. Once I have the stack trace and a sample response, I should be able to point at the cause and open a tracking issue.

    Plugin Contributor Gary Jones

    (@garyj)

    Thanks for the detailed write-up @fierys, that’s enormously helpful.

    The behaviour you are describing matches the issue tracked in #1252. In short: when the Authors panel in the editor cannot resolve one of the saved author term IDs, the panel can persist data that leaves wp_posts.post_authorout of sync with the chosen co-author. That is exactly why deactivating Co-Authors Plus reverts the post to “Administrator”, and why a Quick Edit save resolves it (Quick Edit goes through a different code path that always re-syncs post_author).

    The fix is in #1253, already merged to develop, and will ship in the next release. It is not in 4.0.2.

    If you are happy to help me verify, two questions:

    1. When you open a fresh post in the editor as Administrator, does the Authors panel show a brief spinner before resolving your name, or does it show a spinner that never goes away?
    2. If you remove the Administrator entry before adding the new author (rather than after), does the saved result differ at all?

    In the meantime, the Quick Edit workaround you have already discovered is the reliable path until the next release lands.

    Plugin Contributor Gary Jones

    (@garyj)

    Which version of Co-Authors Plus are you using / did you first notice the issue? This will help to narrow down which change it might have been.

    Plugin Contributor Gary Jones

    (@garyj)

    Hi @rsterry48,

    Thanks for flagging this, and apologies for the slow reply.

    A few of the warnings you listed look likely to be resolved on the latest 4.0.2 release. The “Attempt to read property user_nicename on bool” warning in particular has had three targeted fixes since you posted, covering guest author pages with conflicting query vars and a couple of paths around user deletion. The trim() deprecation around comma-separated author query vars has also been tightened with an is_string() guard.

    That said, I can’t promise every one of the deprecations you saw is gone. The notices you quoted are quite generic, so without the file paths and line numbers it’s hard to be certain we’ve patched the exact call sites you hit. There are still a handful of preg_replace() and stripos() calls in the plugin where the input isn’t explicitly validated as a string before the call, and any of those could still fire under PHP 8.1+ if an upstream plugin or query happens to feed them a null value.

    Could I ask you to do two things, when you have a moment?

    1. Re-test on 4.0.2 and let us know whether the warnings still appear.
    2. If they do, please paste the full notices including the file path and line number that PHP reports for each one. With that we can either fix the specific call sites straight away or, if they’re already fixed, confirm that for you.

    Thanks again for taking the time to report this. The detail will help us close it out properly rather than guess.

    Plugin Contributor Gary Jones

    (@garyj)

    Also, what theme are you using and is the byline rendered by a block/template or by classic theme code?

    Plugin Contributor Gary Jones

    (@garyj)

    Hi @ayoungvoice.
    Which version of CAP and WP are you using?

    Plugin Contributor Gary Jones

    (@garyj)

    Hi @bradley2083,

    Thanks for the clear reproduction — you’ve spotted a real bug in Co-Authors Plus.

    CAP’s filter on get_the_archive_title was rebuilding the author archive title from scratch with a hard-coded “Author: ” prefix, which overrode the Archive Title block’s Show archive type in title toggle. Untoggling it correctly told core to drop the prefix, but CAP put it straight back.

    A fix is up for review here: https://github.com/Automattic/co-authors-plus/pull/1259

    It changes the filter to reuse the prefix that core has already resolved, so the block’s toggle is honoured for both registered users and guest authors. Once it’s merged it will go out in the next CAP release.

    Plugin Contributor Gary Jones

    (@garyj)

    Today, hopefully!

    Plugin Contributor Gary Jones

    (@garyj)

Viewing 15 replies - 1 through 15 (of 150 total)