David Stockdale's Scrapcode

Co-Authors Plus 3.5.4 Update 404

Recently I began to find that the recent Co-Authors Plus update causes 404 errors on my author archives.

This was strange as it was never on the first page of the archive, only on the later pages near the end of the archive.

This lead me to guess that it was due to an incorrect count somewhere since I was using a custom list which included all the pages and posts authored or co-authored by that author in a single list.

Some testing lead me to find that the error only began from Version 3.5.4 onward.

So I looked at the changelog and found this line:

This sounded like something that could have caused my problems!

So I searched for “pre_handle_404” in “co-authors-plus.php” and found this:

			if ( ! is_paged() ) {
				add_filter( 'pre_handle_404', '__return_true' );

And after confirming that this if statement wasn’t in Version 3.5.3 I simply commented it out leaving only the filter.

This fixed my problem without causing any other issues (that I know of).

Until the next time Co-Authors Plus decides to fix what isn’t broken!

Leave a Reply