SimplePress Incompatibility with Site Search and Directory

I understand this may be beyond the scope of support for these forums, so I don’t expect any miracles. But any information that can help us get a couple Premium plugins to play nice with SimplePress forums would be greatly appreciated.

Issue: Installation of either the Global Site Search, or Blogs Directory plugin causes 404 errors an all SimplePress forum sub-pages. For instance, domain.tld/forums will load fine, but all domain.tld/forums/topic/ pages will throw the 404. Remove these plugins and forums function perfectly again. I have confirmed this issue is not theme related and have Blogs Directory running on our dev install if anyone cares to see the problem in action.

Here is feedback I’ve received from the SPF Developers…

are those plugins altering rewrite rules? we simply add our rewrite rules to the wp rules… or are they adding new ‘pages’ in the middle of the url?

our rewrite rules are done in a single location… file sf-loader-global.php in routine sfg_set_rewrite_rules()

we will be happy to work with these folks if they have any suggestions

Thanks in advance to anyone who can provide answers to their questions, or any other feedback that will help us troubleshoot the incompatibility.

  • jcnjr
    • HummingBird

    Thought this might help …


    # sfg_set_rewrite_rules()

    # Setup the forum rewrite rules


    function sfg_set_rewrite_rules ($rules)


    global $wp_rewrite;

    $slug = get_option('sfslug');

    if ($wp_rewrite->using_index_permalinks())


    $slugmatch ='index.php/'.$slug;

    } else {

    $slugmatch = $slug;


    $sf_rules[$slugmatch.'/([^/]+)/?$'] = 'index.php?pagename='.$slug.'&sf_forum=$matches[1]';

    $sf_rules[$slugmatch.'/([^/]+)/page-([0-9]+)/?$'] = 'index.php?pagename='.$slug.'&sf_forum=$matches[1]&sf_page=$matches[2]';

    $sf_rules[$slugmatch.'/([^/]+)/([^/]+)/?$'] = 'index.php?pagename='.$slug.'&sf_forum=$matches[1]&sf_topic=$matches[2]';

    $sf_rules[$slugmatch.'/([^/]+)/([^/]+)/page-([0-9]+)/?$'] = 'index.php?pagename='.$slug.'&sf_forum=$matches[1]&sf_topic=$matches[2]&sf_page=$matches[3]';

    $rules = array_merge($sf_rules, $rules);

    return $rules;


  • drmike
    • DEV MAN’s Mascot

    Hmmm, I don;t recall any rewrites with Simple Press. I’m just used to the normal old style urls.

    Can you copy and paste your htaccess file into a text file somewhere and link to it please? We don;t use the search or the directory plugins on my installs but I may be able to see something there if it sticks out.

    What happens when you turn off the rewrites within simple press?

  • Andrew
    • Champion of Loops


    We’ll take a look at this when we can. Again though, the plugins seem to behave with other plugins that update the internal rewrite rules. If there was a problem with the way they handle the rewrite rules I imagine we’d see the Global Site Tags, Global Site Search, Blogs Directory and Members Directory plugins having issues.



  • jcnjr
    • HummingBird

    Thanks! I understand this may take a back burner. I’ll help troubleshoot and test anyway I can. FYI: I haven’t tried the Tags plugin, but can confirm the issue with the other two.

    @drmike: Turns out the only way to "turn off" the SPF rewrites is to revert to the WP default permalinks. Doing so basically broke navigation for my test site. All pretty page structures like domain/forums loaded the index.

  • Moshe_SWD
    • Flash Drive

    Did you ever figure out a solution to this problem? I’m having a similar problem with Simple Press Forums, although I’m not using either of the plugins that you are using. If you did figure it out, could you please let me know – thanks.

    All the best,


  • jcnjr
    • HummingBird

    Did you ever figure out a solution to this problem?

    Our only solution has been to not install any of the mu plugins Aaron mentions. Hope to try again after upgrading everything for 3.0 compliance.

    You might want to try Aaron’s suggestion on another related topic (unless he says it has already been implemented in current versions):

    I think you can just comment out the line with flush_rewrites() temporarily until we fix it up.

  • jcnjr
    • HummingBird

    Anyone care to test?

    FYI: Just tested the Blogs Directory plugin on WP 3.01 and all SimplePress forums still render the 404.

    Tried your suggestion to “comment out the line with flush_rewrites() temporarily until we fix it up.” but it didn’t help… primarily because no such line exists in that plugin. :wink:

    This is the line I commented out:

    // $blogs_directory_wp_rewrite->flush_rules();

    If there is another line I can try editing, let me know. Otherwise, I’ll be happy to test any future version. Thanks!

  • jcnjr
    • HummingBird

    Are you using any of these: Global Site Tags, Global Site Search, Blogs Directory and Members Directory?

    For the record, current versions of the following now seem to be fully compatible with SimplePress (v4.3.5):

    – Global Site Search

    – Blogs Directory

    – Members Directory

    Haven’t installed Site Tags. Intended as FYI only…

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.