Protected Content error upon import

I've installed Protected Content and attempted to import existing memberships, but I get the following error, and then when I check the imported members they're almost all listed as Visitors instead of their actual memberships.

Fatal error: Uncaught exception 'Exception' with message 'Invalid Membership Relationship' in /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-event.php:501 Stack trace: #0 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-relationship.php(361): MS_Model_Event::save_event('signed_up', Object(MS_Model_Relationship)) #1 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-relationship.php(268): MS_Model_Relationship::_create_ms_relationship(1332, 30, 'admin', 0) #2 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-member.php(988): MS_Model_Relationship::create_ms_relationship(1332, 30, 'admin', 0) #3 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-import.php(447): MS_Model_Member->add_membership(1332) #4 /home/cont in /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-event.php on line 501

  • Michelle Shull

    Hi, Ohad!

    Thanks for enabling support access already. I took a look, and everything seems to be set up correctly. I suspect there may be a plugin conflict happening, so I'm going to have you follow a couple of steps and the try to re-import the Membership members to Protected Content.

    One question, first, was your recurring payment set up with 2Checkout? We aren't able to import 2Checkout recurring payments to Protected Content at this time, as it explains in the notice on the importer in Protected Content.

    Okay, let's try this:
    1. De-activate all your plugins except Membership and Protected Content.
    2. In Membership > Options, go to the Advanced Tab and hit "Repair Membership Tables."
    3. In Protected Content > Settings, go to the Import tab, choose to import from Membership, and preview the import. If everything looks okay, try running the importer again.

    If it works, you can reactivate all your plugins and go on with your day.

    If it doesn't, report back in and we'll dig a little deeper.

    Thanks, Ohad!

  • Ohad

    hi

    1. i deactivated all plugins except membership pro and protected content
    2. i flushed the cache
    3. i repaired the membership tables
    4. i imported again, rewriting previous data

    i received the following error several times:

    Fatal error: Uncaught exception 'Exception' with message 'Invalid Membership Relationship' in /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-event.php:501 Stack trace: #0 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-relationship.php(361): MS_Model_Event::save_event('signed_up', Object(MS_Model_Relationship)) #1 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-relationship.php(268): MS_Model_Relationship::_create_ms_relationship(1454, 30, 'admin', 0) #2 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-member.php(988): MS_Model_Relationship::create_ms_relationship(1454, 30, 'admin', 0) #3 /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-import.php(447): MS_Model_Member->add_membership(1454) #4 /home/cont in /home/content/p3pnexwpnas06_data02/20/2369020/html/wp-content/plugins/protected-content/app/model/class-ms-model-event.php on line 501

  • Michael Bissett

    Hey @Ohad, really sorry for the delay here!

    In looking at the error log that you posted, one question's on my mind... would the user with the ID of 30 happen to have an Administrator role (or something that's not a Subscriber role)?

    If so, then you'll want to remove the membership from that user first (admins really aren't supposed to have a membership inside of Membership Pro anyway), and then try going through the import process again.

    If that doesn't do the trick though, we'll want to have a deeper look at things, and do some further troubleshooting. In that case, could you please send in the following via our contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    On the contact form (linked to below), please select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.