Fatal Error adding membership class-ms-addon-searchindex.php on line 286

I've had a couple of occurrences of this error today. Any idea what might be causing it? I had a problem with a new member yesterday apparently not being able to access protected content, despite having the appropriate membership assigned in 'all members'. Could these be related?

mod_fcgid: stderr: PHP Fatal error: Call to a member function add_membership() on a non-object in ...../wp-content/plugins/membership/app/addon/searchindex/class-ms-addon-searchindex.php on line 286

  • Predrag Dubajic
    • Support

    Hi Johanna,

    We are currently looking into some reports regarding M2 and some SEO plugins, do you have Yoast SEO or SmartCrawls installed on your site?

    If yes can you try deactivating them and let us know if the issue continues after that?

    Looking forward to your response.

    Best regards,
    Predrag

  • David
    • The Incredible Code Injector

    This ever get figured out? It started happening to me - but was fine and didn't change too much. I tried disabling this addon as well. But simply can't register at all and I did have smartcrawl and I deactivated it. Thanks

    plugins/membership/app/addon/searchindex/class-ms-addon-searchindex.php on line 286

  • Johanna
    • The Incredible Code Injector

    Hi

    I thought this problem was solved in the latest version of the plugin which we installed 2 days ago, however, we're still getting the error
    [03-Dec-2015 17:26:53 UTC] PHP Fatal error: Call to a member function add_membership() on a non-object in ...../wp-content/plugins/membership/app/addon/searchindex/class-ms-addon-searchindex.php on line 286

    Kind Regards
    Johanna

  • Adam Czajczyk
    • Support Gorilla

    Hello Johanna,

    I hope you're well today!

    I checked plugin's changelog regarding recent release and I can't see any mentions of this issue there, however not everything is detailed there. That said, I've already asked plugin's developer about it and I believe he should let me know what's the status of the fix once he gets back online.

    Please keep an eye on this thread and I'll keep you updated.

    Best regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi Johanna,

    This issue has been addressed in 1.0.2.6, since you can't update your main site due to other issue with invitation code you can try applying the fix manually while we deal with the issue.

    You would need to go to /wp-content/plugins/membership/app/model/ folder and in class-ms-model-plugin.php change line 18 from this:
    private $member;
    to this:
    public $member;

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.