• Resolved cmurphy124

    (@cmurphy124)


    WordPress Version: 6.9.4 (MultiSite / WPEngine)

    Plugin: Co-Authors Plus (Version 4.0.2)

    Problem:

    When searching for authors to add nothing populates and gray circle just spins. In the browser console we see the following error:

    Uncaught TypeError: b.split is not a function

    The error first appeared after upgrading to version 4.0.1

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Thread Starter cmurphy124

    (@cmurphy124)

    1. Here is the full stack. I redacted the URL.

    Uncaught TypeError: b.split is not a function
    jQuery 30
    coauthors_create_autosuggest https://[redacted].[redacted].com/wp-content/plugins/co-authors-plus/js/co-authors-plus.js:174
    coauthors_initialize https://[redacted].[redacted].com/wp-content/plugins/co-authors-plus/js/co-authors-plus.js:331
    https://[redacted].[redacted].com/wp-content/plugins/co-authors-plus/js/co-authors-plus.js:399
    jQuery 13
    2 suggest.min.js:1:1354
    jQuery 30
    coauthors_create_autosuggest https://[redacted].[redacted].com/wp-content/plugins/co-authors-plus/js/co-authors-plus.js:174
    coauthors_initialize https://[redacted].[redacted].com/wp-content/plugins/co-authors-plus/js/co-authors-plus.js:331
    https://[redacted].[redacted].com/wp-content/plugins/co-authors-plus/js/co-authors-plus.js:399
    jQuery 13

    Update:

    We were able to fix this issue by clearing our Cloudflare 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.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.