When I try to add a subscription to an account I get an error message.

Hi

I have an issue where a member who signs up without a subscription is unable to add a subscription.

So when signing up a member navigates away from the paypal payment then gets set to a visitor level.

I then want the protected content page to direct to “add subscription”

The add subscription page seems to work fine but when they click “buy” they get navigated to this page:

wp-admin/admin-ajax.php?action=buynow&subscription=1

With an error message of:

Oops! You do not have sufficient permissions to access this page.

This is not something I have added into my url group and is not a message I have generated.

Hope someone can help as I am hoping this is my final hurdle until launching.

Kind Regards

Mark

  • Alexander
    • DEV MAN’s Mascot

    Hi @mark_bonito,

    Can you go to “Memership -> Options” and check to make sure that “Use subscription” is set to none. If you’re using a paid model, you don’t want to be using this – it places users on an “admin gateway” which prevents them from paying. If you need a free subscription, you should set the price of that subscription to zero, and allow users to signup to it like normal.

    I’ve not seen that URL handled in that way on the front end. How is your add subscription page setup? Are you using the popup form? Or have you created a custom form with shortcodes?

    Best regards,

  • mark_bonito
    • Site Builder, Child of Zeus

    Hi Alex. I am using a blank subscription page and the pop up registration page.

    Nothing complex.

    I do actually think its a theme clash with the main theme I am using alongside the membership plugin.

    I dont get very good support from the theme devs and they are likely to get me to ask here yet at the same time I dont expect you guys to support me.

    Hmmm… might need to scratch my head a little here.

  • mark_bonito
    • Site Builder, Child of Zeus

    So to recap:

    If a member is signed in but has no subscription in place. When they click the Signup button it takes them the an AJAX

    /wp-admin/admin-ajax.php?action=buynow&subscription=1

    Its not going to let them in because its a /wp-admin link.

    If anyone has a suggestion it would be greatly appreciated as I Ive scratched my head for a long time thinking this through and not gotten anywhere :slight_frown:

    Kind Regards

    Mark

  • Alexander
    • DEV MAN’s Mascot

    Hi @mark_bonito,

    I’m sorry for the delay here. As for the theme issue. Would it be possible for you to verify this with some testing?

    Even if it’s not our theme, we’d be happy to support you with it if we can. Can you try testing by switching to the TwentyThirteen theme temporarily? If it works, we’ll know it’s a theme issue. At that point, maybe I could get a copy from you to test some things out.

    As for the link, /wp-admin/admin-ajax.php is used for AJAX requests. These can be made on the front end, but usually happens behind the scenes via javascript. It’s unusual for users to be directed to a link like this.

    Can you check the javascript console for errors? In Chrome go to “View -> Developer -> Javascript Console” and in Firefox you can go to “Tools -> Web Developer -> Console”

    Best regards,

  • mark_bonito
    • Site Builder, Child of Zeus

    Thank you so much for your reply.

    To clarify I have switched to the 2013 theme and the membership upgrade works fine. So its clear the plugin is clashing with my theme.

    I have opened the javascript Consol but cant see any signs of errors.

    Im happy to throw a copy of the theme to you. How would you like me to send it to you?

    Kind Regards

    Mark

  • Alexander
    • DEV MAN’s Mascot

    Hi @mark_bonito,

    Thanks for sending me the theme and admin access. I’ve looked into this, it’s it’s proven quite difficult. Unfortunately I haven’t been able to get this working with your theme.

    It’s doing some kind of custom registration override that is interfering with the Membership plugin. I’m not sure what’s causing this, but I’m going to touch base with the plugin developer to see if he has any ideas.

    @Eugene Manuilov, The issue is PayPal won’t redirect back to the site properly. It’s saying it has an invalid redirect URL. I’ve passed on the info emailed in as well. Thanks!

  • Eugene
    • Syntax Hero

    Hi @mark_bonito

    I have take a look at your site and can't replicate Oops! You do not have sufficient permissions to access this page. error. All what I see is blank subscription popup content. See it in attached screenshot.

    Could you please switch from popup to standard registration process and check if this route will work for you?

    Also I have noticed that you are using 3.4.6.rc.1 version of the plugin, which is deprecated due to release of 3.4.6 version. Could you please upgrade the plugin by installing WPMUDev Dashboard plugin or manually by downloading plugin from this site and overriding all files via FTP?

    Regards,

    Eugene

    [attachments are only viewable by logged-in members]

  • mark_bonito
    • Site Builder, Child of Zeus

    Thank you both for looking in to this. Your wisdom is so greatly appreciated. I think I have now got this working the way I want.

    Many many thanks once again as I see the problem was with my theme and not with a mpmudev plugin.

    Kind regards

    Mark