Getting a fatal error activating MarketPress in a multisite

I am getting the following error when I try to Activate MarketPress on a subsite of a Multisite install:

Fatal error: Call to a member function get_page_permastruct() on a non-object in /home/opticomd/public_html/wp-includes/link-template.php on line 358

I don’t have Marketpress Network Activated because I don’t want all of the subsites to have access to this plugin, so I have it installed at the Network level and I activate it on the subsite level. I tried in two different mutisites (my Dev site and my Prod site) on two different hosting platforms, HostGator and SiteGround.

I am using the Divi Theme on both sites, but I have MarketPress installed on another site with the Divi theme.

  • Vaughan
    • Ex Staff

    Hi Dan,

    Hope you’re well?

    Does this only happen when using the Divi theme? could you switch to the default twentyfourteen theme and see if it still happens?

    I can’t replicate this at all on my own sites, the only thing I don’t have is Divi. But this I think maybe theme related, seems to only occur when $wp_rewrite isn’t instantiated before the call to get_page_permatruct()

    But not sure why this is happening to you.

    Can you send your details using the following contact form (select i have a different question from the dropdown.)

    https://wpmudev.com/contact/

    Mark for attn: Vaughan

    Include a ref URL to this thread.

    Please include the following details;

    – Site login details (super-admin if on multisite)

    – FTP login details so I can take a look at the theme/plugin files.

    Thanks

  • dmuchnok
    • Site Builder, Child of Zeus

    HI Vaughan,

    I was just about to send you an email with all of that info, when I accidentally blew it away when I was looking up the FTP creds! I started up my cPanel from the same tab and blew away all of the info I had typed in. :slight_frown:

    Anyway, the interesting thing is that it looks like the plugin is activated in spite of the fatal error. When I returned to the sites I had activated, they were active. I still get the Fatal Error, and I get it on the Vertex theme and TwentyFourteen, but when I hit the back button, the dashboard shows the plugin active.

    I have to run to a meeting, but I’ll send you the login and FTP creds for my dev site when I return.

  • Vaughan
    • Ex Staff

    Hi Dan,

    I’m not seeing any errors at all, and everything looks good.

    However, I do notice you also have woocommerce installed but not activated. Please be aware that having both MP & Woocommerce enabled will give you errors and issues. We are hoping this will be addressed in MP 3.0 due for release early december.

    Could you tell me exactly how to replicate this error? is it just when physically activating the plugin itself? I don’t want to disable & re-activate again and end up breaking the site.

    Thanks

  • dmuchnok
    • Site Builder, Child of Zeus

    Hi Vaughan,

    I only have WooCommerce installed on the Dev site that you looked at, it’s not in my production site for the reasons you mentioned.

    The error only shows up when you activate MP on a site. The curious thing is that MP does actually get activated, so it seems to be something that happens after the plugin is actually activated, maybe while the site is trying to display the activation progress?

    Go ahead and try to activate the plugin on a sub-site to see if you can replicate.

  • dmuchnok
    • Site Builder, Child of Zeus

    Well, it doesn’t seem to be happening any more – I don’t know why. This morning, I did update E-Newsletter on the dev site (and on the prod site, but I haven’t tested MP there). That’s the only plugin change I made.

    I had implemented Smush Pro on both sites yesterday and I thought that may have been the problem, but I deleted it and it didn’t fix the problem. I Installed and Activated Smush Pro a minute ago, but I can still activate MP, so that’s definitely not the problem.

    Maybe if you install the older version of E-Newsletter and try activating MP you could re-create the issue. Or not, it seems to have fixed itself anyway!

    Thanks!

  • Vaughan
    • Ex Staff

    Hi,

    No problem, i’ll see if i can replicate with old e-news on my own site. but looks as though everything is ok now your side at least. I’ll mark this as resolved, but should the issue ever return, feel free to re-open or start a new thread :slight_smile:

    Thanks