Gary Jones
Forum Replies Created
-
Forum: Plugins
In reply to: [Co-Authors Plus] After update the plugin author widget isn’t renderedThanks @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 functionatco-authors-plus.js:174, is the legacy admin script trying to call.suggest(). We removed that call in 4.0.0 (commit6d1cf8b, where we replaced the deprecated WordPresssuggestlibrary with jQuery UI autocomplete). The function name in your stack trace,coauthors_create_autosuggest, was also renamed tocoauthors_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')atindex.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 thePluginDocumentSettingPanelAPI move (it shifted fromwp.editPosttowp.editorin 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:
- 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.)
- 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.jsis still serving fromcoauthors_create_autosuggest, or whether it now showscoauthors_create_autocomplete(which is the correct name in 4.0+).Forum: Plugins
In reply to: [Co-Authors Plus] Plugin Not WorkingThe 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 theonChangehandler insrc/components/co-authors/index.jsx:104-112, which callsaddItemByValue()and thenupdateAuthors(). 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/buildCoauthorTermIdsrework 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
termIdoruserNicename, which would makeaddItemByValuefind 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?
Forum: Plugins
In reply to: [Co-Authors Plus] After update the plugin author widget isn’t renderedThe 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
registerPluginpanel throws during render. So this is our React component (src/components/co-authors/index.jsx, registered viasrc/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?Forum: Plugins
In reply to: [Co-Authors Plus] Authors do not populateGlad to hear it’s sorted. Thanks for following up — that’s a useful data point. Stale CDN-cached copies of
co-authors-plus.jsfrom 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.Forum: Plugins
In reply to: [Co-Authors Plus] Blocksy Pro Author Box doesn’t update after changing authorThanks, 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:
- 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. - 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 staleget_post()to the code that does the sync. - 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Blocksy Pro Author Box doesn’t update after changing authorThanks 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_authoris 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:
- The list of all active plugins on the site.
- Whether the site uses a persistent object cache (Redis, Memcached, or a plugin like W3 Total Cache, Redis Object Cache, etc).
- 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?
- 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Authors do not populateThanks 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:
- 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.splitreference on its own is hard to map back to source. - 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 auserNicename,id, or havenullwhere a string is expected, that would explain the throw. - 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.
- 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Blocksy Pro Author Box doesn’t update after changing authorThanks 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-syncspost_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:
- 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?
- 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Guest Author is not showing upWhich 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Deprecated errors when upgrading from PHP 7.4 to 8.2Hi @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_nicenameon 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. Thetrim()deprecation around comma-separatedauthorquery vars has also been tightened with anis_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()andstripos()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?
- Re-test on 4.0.2 and let us know whether the warnings still appear.
- 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Guest Author is not showing upAlso, what theme are you using and is the byline rendered by a block/template or by classic theme code?
Forum: Plugins
In reply to: [Co-Authors Plus] Guest Author is not showing upHi @ayoungvoice.
Which version of CAP and WP are you using?Forum: Plugins
In reply to: [Co-Authors Plus] “Author” being added on single author templateHi @bradley2083,
Thanks for the clear reproduction — you’ve spotted a real bug in Co-Authors Plus.
CAP’s filter on
get_the_archive_titlewas 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.
Forum: Plugins
In reply to: [Co-Authors Plus] Current user not unassigned in editorToday, hopefully!
Forum: Plugins
In reply to: [Co-Authors Plus] Current user not unassigned in editorThank you – also reported in https://github.com/Automattic/co-authors-plus/issues/1252 and resolved in https://github.com/Automattic/co-authors-plus/issues/1253