Support » Plugin: Mingle Forum » Rewrite Rules Deleted/Inserted on every request

  • Resolved doublesharp



    I noticed that the WordPress rewrite rules are being rewritten to the database on every request with the Mingle Forum enabled. After a bit of digging, I discovered that it was due to the code on line 17 in wpf.class.php

    add_filter("init", array(&$this, "flush_wp_rewrite_rules"));

    The problem goes away when the rewrite function is only called when the rules are updated:

    add_filter("rewrite_rules_array", array(&$this, "flush_wp_rewrite_rules"));


Viewing 3 replies - 1 through 3 (of 3 total)
  • I take that back, the new add_filter rule eats up a ton of memory, so in the meantime I have commented it out entirely to prevent the rules from being re-inserted to the database on every request. Any ideas on a better action hook to prevent this?



    I had a problem, too, with one of my custom post type plugins, Roo Classifieds, and I fixed it by commenting out line 17.

    The filter should run on plugin activation, not on init:

    register_activation_hook( __FILE__, 'rcads_activate' );
    function rcads_activate() {
    Plugin Author cartpauj


    Good catch guys, we’ll take a look at this soon. We may fire it on options save page instead of activation hook though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Rewrite Rules Deleted/Inserted on every request’ is closed to new replies.