To test this you will need to keep that ‘add_action’ – sp_404() routine discussed above removed or commented out. To make the further changes you need two files. They are both in the /sp-startup/ folder and are (1) sp-load-site.php and (2) sp-load-core.php.
In the first file locate these lines:
# Rewrite Rules
add_filter('page_rewrite_rules', 'sp_set_rewrite_rules');
and comment out the second line. But make a copy of it as we are going to move it to the second file. About half way down the second file you will find the comment:
# Set up core support WP Hooks
Add the line of code we are removing from the first file under this comment in the second file.
Now – this is all theory at the moment but it does make sense and is (at the very least) one rational explanation of what is happening to you. IF you have a plugin installed that is flushing and rebuilding the WP rewrite rules on a regular basis and doing this within the WP Admin then with the SP code as it is it will fail to include the SP rules leading to a 404 page. By moving that line of code above it will ensure the SP rules be included in any rebuild of this kind.
To be honest it is the only scenario at the moment we can come up with that covers what is happening to you. And it should be stressed that if this DOES resolve your issue then the plugin performing the rebuild should be rooted out as it is very bad practice to flush and rebuild the rules like this.
Anyway – my fingers are crossed on your behalf. I really am hoping this is the key…