Pro site manual upgradation gets error

Hello,
I have two levels in pro sites, when i manually upgrade through admin the blogs to second level, i am getting this error "Fatal error: Call to a member function flush_rules() on a non-object in /home/ddetez/public_html/wp-includes/rewrite.php on line 108". and the site becomes not accessible. But the first level manual upgradation is working fine.

Also i have another error, when registering a new blog "Fatal error: Call to undefined function gde_base_url() in /home/ddetez/public_html/wp-content/plugins/google-document-embedder/libs/lib-setup.php on line 15

Could you please advice.
Many Thanks

  • Alexander
    • DEV MAN’s Mascot

    Hi @thinkcadd,

    The second error would be related to the google-document-embedder plugin. You could try disabling this and creating a site to see if works.

    I've tested the first issue, and everything is working ok for me. I think the second error might be having an affect on Pro Sites.

    Could you try disabling Google Document Embedder to see if this makes a difference? It might have a Multisite compatibility bug.

    Best regards,

  • thinkcadd
    • Flash Drive

    Hello @Alexander Rohmann,

    I have resolved the problem with Google doc embedder plugin. Actually google doc embedder works just fine with multisite, but it cannot be network activated rather activate per site only. So when i put condition in prosite premium plugin to auto activate this plugin, it caused some conflict and caused this error. When i unchecked auto activate option in prosite, it is resolved.

    But this problem still persists "when i manually upgrade through admin the blogs to second level, i am getting this error "Fatal error: Call to a member function flush_rules() on a non-object in /home/ddetez/public_html/wp-includes/rewrite.php on line 108". and the site becomes not accessible. ". Any advice.

    Thanks
    DILEEP

  • thinkcadd
    • Flash Drive

    Could you please advice on this problem

    I have 2 levels in prosite, when i manually upgrade through admin the blogs to second level, i am getting this error "Fatal error: Call to a member function flush_rules() on a non-object in /home/ddetez/public_html/wp-includes/rewrite.php on line 108". and the site becomes not accessible. ". Only one level is accessible.

  • thinkcadd
    • Flash Drive

    just an update on the post.
    i have done an edit in rewrite.php core file

    ""Now replaced the two lines

    global $wp_rewrite;
    $wp_rewrite->flush_rules();

    with this one line

    add_action('init', 'flush_rewrite_rules');""

    now the problem seems to be solved. could you please advice, is this change causes any other effects on the site.

    thanks

  • Alexander
    • DEV MAN’s Mascot

    Hi @thinkcadd,

    I'm sorry for missing your post here. It sounds like another plugin may have overridden the properties of the $wp_rewrite variable. I've tested this, and it's working ok with just Pro Sites. Good to see you found a solution.

    If you ever have issues with permalinks on your sites, you can flush rules manually by going to "Settings -> Permalinks" and clicking "save"

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.