As info: I have written a plugin that adds JPagination navigation and an extended toc for specific articles in a similiar way like plg_content_pagebreak does but that listens to another tag/regex. Whenever there is no "system-pagebreak" marker inside an article plg_content_pagebreak throws a 404 then.
Summary of Changes
Remove exception that ignores that several use cases and extensions could use pagination or toc without "system-pagebreak" regexes. The exception was added with #11217
Set "Simple performance check" earlier.
Testing Instructions
See #17305 for cases where the exception creates annoying conflicts.
Apply patch and test again if any failures come up.
Expected result
Also other extensions can use JPagination and things similiar like TOC (start=xyz) without failures.
It should be possible to use these extensions without deactivating plg_content_pagebreak that could be used in other articles.
One have to deactivate plg_content_pagebreak to get no 404 or have to kick custom extensions that use Joomla features and standards (e.g. $page that comes from core).
The only way to get rid of this 404 is to add a senseless class="system-pagebreak to your custom extension tag or the article text before plg_content_pagebreak works. Bad practice. [EDIT: That's a stupid idea because plg_content_pagebreak then throws another exception. I don't understand at all why this plugin has to throw 404 exceptions.]
Closed because doesn't fix the problem. 404 comes from elsewhere.
Reopened. I've made an error during tests.