If flush_rewrite_rules() is included in an init action, my plugin's permalink rules are followed, but I experience various DNS timeouts in the dashboard like when searching for new plugins and get the following:
An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.
But if I flush as part of plugin activation as per the codex, the permalink changes do not take effect, although I do not get timeouts.
A plugin with just the following is enough to cause the problem:
add_action('init', 'sfs_foo');
function sfs_foo() {
flush_rewrite_rules();
}
Suggestions on how to fix this?
UPDATE: It seems to only occur when Role Scoper is activated.