You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll add more information here as I find any. After the 3.6.0 update, we're seeing this error on the posts list, preventing any other scripts from running:
Uncaught ReferenceError: coAuthorsPlus_ajax_suggest_link is not defined
at HTMLDocument.<anonymous> (co-authors-plus.js?ver=3.6.0:356:30)
at HTMLDocument.dispatch (jquery.min.js?ver=3.7.1:2:40035)
at v.handle (jquery.min.js?ver=3.7.1:2:38006)
at Object.trigger (jquery.min.js?ver=3.7.1:2:70124)
at Function.ajax (jquery.min.js?ver=3.7.1:2:76037)
at Function.<anonymous> (jquery-migrate.min.js?ver=3.4.1:2:4771)
at e.<computed> [as ajax] (jquery-migrate.min.js?ver=3.4.1:2:1582)
at HTMLTableSectionElement.update (cpt.js?ver=6.5.2:48:68)
at x.<computed>.<computed>._trigger (core.min.js?ver=1.13.2:116:7687)
at x.<computed>.<computed>._trigger (sortable.min.js?ver=1.13.2:9:25015)
Code in question is this:
// Show loading cursor for autocomplete ajax requestsjQuery(document).ajaxSend(function(e,xhr,settings){if(settings.url.indexOf(coAuthorsPlus_ajax_suggest_link)!=-1){// Including existing authors on the AJAX suggest link// allows us to filter them out of the search requestvarexisting_authors=jQuery('input[name="coauthors[]"]').map(function(){returnjQuery(this).val();}).get();settings.url=settings.url.split('&existing_authors')[0];settings.url+='&existing_authors='+existing_authors.join(',');show_loading();}});
$this->is_post_type_enabled() is returning false in our case, despite the settings now having been touched and showing that the functionality is enabled for Posts.
I've added debug statements and can see that at some point, while the array of enabled post types has been 'post' and 'page' for a while, 'post' suddenly gets dropped. (Just before the closing </head>, which is where the variable would be output).
So I'm guessing the coauthors_supported_post_types filter runs at some point and removes the post post type from the list of supported types.
I will stop here for lack of time. IMHO, even if there is a reason for the filter to remove 'post' from the supported types, the javascript code should make sure that the variable is defined before using it and/or the file should only be enqueued if the post type is supported. The former is probably easier to achieve than the latter.
I'll add more information here as I find any. After the 3.6.0 update, we're seeing this error on the posts list, preventing any other scripts from running:
Code in question is this:
I can see the variable gets defined here
Co-Authors-Plus/php/class-coauthors-plus.php
Line 1460 in 586e803
The text was updated successfully, but these errors were encountered: