Membership plug in: subscription sign up trouble, [more] shortcode not working for me


Here's a description my attempts to solve 2 problems with Membership Plugin, for the site I'm building for my first WPMU client:

Membership Version 1.0 RC3
Firefox 3.6.8 (building)
Chrome 5.0375.125 (testing)
Safari 5.0 (testing)
Safari for iPhone 3G (testing)

What I've Done So Far
I went through the Manual throughout, and documented the process in screenshots and pdfs - have only used a few in this post to try to keep the message short, but I can show you specific parts of the process if needed.
I've also deleted the plugin twice, then re-installed it twice, once as an 'mu-plugins' and once as a 'plugins' install. In each case, I don't lose any of the Membership settings - which I found convenient, but odd; why wouldn't they be deleted along with the plugin itself. So I can't say I've really started from scratch. But I tried to. And in both reinstalls, I had the same problem: anybody can see anything they want to on the site, and registration doesn't work. We're trying to soft launch to the client's inner circle tomorrow, but I have to figure out what I've done wrong and I've come to the end of my knowledge.

Problem 1: Registration process not working
Here's the registration page:

If I am not logged in (Non-Member), I see the first step in the Registration process, and the next step is that I'm registered. I'm never asked to choose-or pay for- a subscription.

if I am logged in (Member), I see the second step in the Registration process (the url is still and here I'm asked to chose and pay for a subscription.

This doesn't make sense. 1 person has already joined up without paying.

What should happen, as far as I can see, is:
a. if I'm logged in, I don't see the Registration page at all, because I don't need it.
b. if I'm not logged in, I see page 1 and page 2 in succession after I fill each of them out, so I enter my information, I pay, then I get my activation link in email, and PayPal confirms the payment.

2. Protected Content not Protected
I've used the [more][/more] tags on blog posts, and that's not working:
a. as a Non-Member, I can still see the entire post.
b. I can also see the tags
for example: on the front page, you'll see that these posts show the tags, but you can see them easily, although they should be protected 'teaser' content:

Successful Collaborative Workshops
8 Free Marketing Tools
World Hoop Day Choreography Project

The settings should lead to a No-Access page, which I've set up here:

But, although I've set that page in the Edit Options, none of the restrictions I set there are working.

Thank you very much.


  • Mason
    • DEV MAN’s Sidekick

    Hiya Terri,

    Sorry this has given you difficulty. The plugin is still not a final release so there's bound to be a few issues that need to be sorted. Thanks for the detailed information in your post and for documenting every step so carefully. It really helps when trouble-shooting! :smiley:

    First off, after deletion:

    I don't lose any of the Membership settings
    This is because information entered in through the plugin is stored in the WordPress database. Deleting the plugin files only removes functions that call WordPress to retrieve this information, but the data is still there. You can drop these tables from your database to get a full, fresh start if needed. There's a post here somewhere that tells you exactly what to look for in the db, but I can't find it at the moment.

    ]Registration process not working

    The payment has to come after the username and/or site has been created - that's the only way to attach the payment to a specific user ID. I have not yet had a chance to test the registration process in detail so Barry will have to comment more about this process.

    Protected Content not Protected

    For the shortcodes have you entered "more" into the Membership > Edit Options panel? Do you have the Shortcode visibility default set to "No"? If you do, then by placing the [more] [/more] tags around your content they should be hidden to visitors.

    Again, I'll flag this one for Barry as well. Thanks!

  • Terrintokyo
    • Flash Drive

    Hi Mason:

    You are indeed nice! :wink:

    Thanks so much for your feedback - my responses:

    1. Membership settings in database
    Okay, no problem: unless I absolutely have to delete those fields in the DB, then it's helpful that they're still there. And it's very helpful that now I know why!

    2. Registration Process
    Hmmm, it seems a little strange that people wouldn't be asked to pay as part of the initial sign up process, no? People shouldn't be able to sign in without choosing a subscription plan - it seems as if somehow, those 2 parts of the process should be on one web page. It looks like they've been decoupled somehow...

    3. Content restriction
    Yup, 'more' is one of my shortcodes, the shortcode visibility default is set to 'no -shortcodes are protected by default' and I used the opening and closing more tags in the posts I mentioned: you can see them on the front page - but you shouldn't be able to.

    I really appreciate your responding so quickly and clearing up the Settings issue. As for the other two problems: as I said, I have plenty of screenshots and PDFs documenting the settings and troubleshooting process - but one problem is that if I make them small enough to upload, you won't be able to see details.

    anyway, I'll check back here shortly and hopefully Barry will have a chance to take a look.


  • Barry
    • DEV MAN’s Mascot

    2. Registration Process
    Hmmm, it seems a little strange that people wouldn't be asked to pay as part of the initial sign up process, no? People shouldn't be able to sign in without choosing a subscription plan - it seems as if somehow, those 2 parts of the process should be on one web page. It looks like they've been decoupled somehow...

    At the moment there has to be something (a user) to link the payment to so the user had to be registered first, I'm working on changing this. You can set the options so a registered user, as long as they are a none member, can't see any content anyway - so they are effectively strangers.

    3. Content restriction
    Yup, 'more' is one of my shortcodes, the shortcode visibility default is set to 'no -shortcodes are protected by default' and I used the opening and closing more tags in the posts I mentioned: you can see them on the front page - but you shouldn't be able to.

    I believe more may be one of those internal things that wordpress uses when you add a more tag to a post (it replaces it behind the scenes with a hidden internal more shortcode). Try changing the shortcode to something else and see if that changes things.

  • Terrintokyo
    • Flash Drive

    Hi Barry:

    Thanks for your note.

    We need to launch this weekend, so I'm in a bind. I understand what you're saying: that people could register and see free content, but they'd need to pay to see paid content.

    So, instead of the levels we have now:
    Membership Levels
    Annual Subscription (paid) (can be subscribed to directly, or via a Free Trial) All Access
    Monthly Subscription (paid) (can be subscribed to directly, or via a Free Trial) All Access
    Non-Member: can only see teaser content - if they click a post excerpt, they get a message that has a link to the registration page. Teaser Access

    You are suggesting, instead, that we set up the level this way:
    Annual Subscription (paid) (can be subscribed to directly, or via a Free Trial) All Access
    Monthly Subscription (paid) (can be subscribed to directly, or via a Free Trial) All Access
    Member (unpaid) Limited Access
    Non-Member: (unpaid) Teaser Access

    My questions/comments
    1. Is the above correct?
    2. This means we have to create an additional category of content, which is not what we had in mind.
    3 - and - this is the biggest problem with this solution - : the shortcode restriction doesn't work at all. WordPress does have a 'more' tag that looks like this:
    According to the manual, the Membership plugin has a more tag that looks like this: [more] [/more]
    Because neither tag worked to restrict content, I took your advice and set up a 'formember' tag in Edit Options and I used it in the post below, which you can clearly see in its entirety, even though you are not a member:

    So, this won't work for me, and I am under time pressure to get it done today.

    Can you recommend a WPMUDev member who has made the 'more' tags work that I could ask for advice? At least if I could make access restricted, I could tweak the levels as I note above, with the Paid content only available to registered users.

    Please note: our members will not have blogs, so the Privacy and Supporter plugins are not useful for our business.

    But if restricted access doesn't work, I will have to find another membership solution.

    Your feedback is appreciated.


  • Mason
    • DEV MAN’s Sidekick

    Hey Terri,

    There must be something else different in your install or some setting that isn't set quite right. I have a test install where I've used the [more] shortcode and it is working as expected. I'm running WP 3.0.1 with multi-site, buddypress and I have memberhsip activated from the plugins directory.

    I wish I could give you some other advice, but you may need to delete the references to the membership plugin from the database and then re-install membership. You can recognize them because they have "_m_" in them. For example:

    there's also a couple references in wp_options. Look for option_name membership_active and membership_options

  • Terrintokyo
    • Flash Drive

    Hi Mason:

    I'm so glad we're in a similar time zone!:wink:

    I've been searching WPMUDev Forums for help again, and wondering if this note from Barry on another shortcode problem thread might be something I should do:

    @Nit3watch - where are you putting the shortcode? It has to be within a posts (or pages) content in order for wordpress to be able to process it.

    If you want to limit things elsewhere within a theme there are a few helper functions available in the latest version that you can use in if statements to surround a bit of functionality:

    current_user_on_level( $level_id )
    current_user_on_subscription( $sub_id )

    Of course, I don't know where these 'helper' functions should go, so that's a problem, but presumably easily solved.

    I also remember seeing a thread where Barry listed some changes to the database names that fix problems: but I'd have to do some searching to find it. I can get into my Cpanel and PHPAdmin, but I'm kind of afraid to do it unless I know exactly what to do...

    Which brings me to your suggestions: thank you so much. I'm using WPWebhost - they have amazing support, but of course they don't actually code - although they did do the WPMU install for me.

    So, my bottom line, now that I know that shortcodes should be okay, is I'm going to delete the Membership plugin and all references to it in the database, as you suggest (after I backup the site).

    I'll be back to let you know the results: fingers crossed that this fixes the problem.

    Thank you very much,


  • Terrintokyo
    • Flash Drive

    Hi Mason:

    Okay, I found the note Barry wrote about database table names:

    The plugin should take care of the renaming of the tables it uses as part of the upgrade, but in case it doesn't you should rename the tables as follows:
    wp_membership_levels becomes wp_m_membership_levels
    wp_membership_news becomes wp_m_membership_news
    wp_membership_relationships becomes wp_m_membership_relationships
    wp_membership_rules becomes wp_m_membership_rules
    wp_subscription_transaction becomes wp_m_subscription_transaction
    wp_subscriptions becomes wp_m_subscriptions
    wp_subscriptions_levels becomes wp_m_subscriptions_levels

    so presumably this should already be right. In any case, I'm going to delete all references to wp_m, delete the plugin and reinstall.

    just fyi,



  • Mason
    • DEV MAN’s Sidekick

    OK Terri,

    Those are the references I was referring to. Glad you found 'em!

    PHPMyAdmin is dangerous because it's directly accessing the database, but just stick to the references we've mentioned here and you'll be alright. We've got our fingers crossed over here for ya!

  • Terrintokyo
    • Flash Drive

    Hey Mason:

    I'm finally getting some time to do the database deleting. I will document the process later. but one thing I wanted to just check:

    In my phpMyAdmin home page, there's an alert message that says:

    The additional features for working with linked tables have been deactivated. To find out why, click here.

    when I click the link, it says:

    Server: localhost
    $cfg['Servers'][$i]['pmadb'] ... not OK [ Documentation ]
    $cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
    General relation features: Disabled

    $cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ]
    Display Features: Disabled

    $cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
    $cfg['Servers'][$i]['pdf_pages'] ... not OK [ Documentation ]
    Creation of PDFs: Disabled

    $cfg['Servers'][$i]['column_info'] ... not OK [ Documentation ]
    Displaying Column Comments: Disabled
    Bookmarked SQL query: Disabled
    Browser transformation: Disabled

    $cfg['Servers'][$i]['history'] ... not OK [ Documentation ]
    SQL history: Disabled

    $cfg['Servers'][$i]['designer_coords'] ... not OK [ Documentation ]
    Designer: Disabled

    I wonder if any of this disabled code could be contributing to the problem...?

    Anyway, I had my server folks read through the suggestions, and they know I'm working on deleting Membership and reinstalling.

    I'll let everyone know how it goes within a few hours.




  • Terrintokyo
    • Flash Drive

    and another thought: I wonder if I can fix the problem using Barry's 'renaming the tables advice'? dunno why it didn't occur to me before: I've just looked at the first database and it has the old table nomenclature.

    Perhaps that's the problem?

    I'll try that first, and let you know.

    fingers and ganglia crossed.


  • Terrintokyo
    • Flash Drive

    so, still documenting the process now that I'm trying the 'change the name' approach:

    I have 3 databases for some reason:
    1. wpmu (56)
    2. wpmu2 (48)
    3. wpmudb (46)

    In database 1. wpmu (56), the nomenclature is now:
    I'm going to change all of these tables as Barry advised the other member:
    wp_membership_levels becomes wp_m_membership_levels
    Of course, it's confusing, because where does the '1' go? but I'll keep looking.

    In database 2. wpmu2 (48), the nomenclature is now:
    Okay, that answers the question of where the '1' and the 'm' should go. when I'm replacing the tables names, I'll go with this approach.

    In database 3. wpmudb (46), the nomenclature is now:

    Some questions: does WPMU need 3 databases? I'll hazard a guess that the reason there are three is that there were some WPMU reinstall problems, and 2 of those databases are on the server just in case.
    Is it possible that Membership is connected to a wrong database? It should work that way, I would imagine: but of course, I don't know.

    So, before I go any further, I'm going to talk with my server folks, ask them to determine which database is being used, and to make this change to those tables. and to delete the DB's which aren't being used.

    Once that's all cleaned up, I'll reinstall Membership, and see if that fixes the problem. Even if it doesn't, at least I know I'll be starting with the right number of DBs (unless you tell me that there is a reason to have 3 - which, given my tiny knowledge of SQL, doesn't seem likely...)

    okay, sorry about the digression, but I'm documenting in case anyone else runs into a similar problem.

    back later,


  • Terrintokyo
    • Flash Drive

    Hi Barry:

    You are Mason are superstars, seriously. I hope I've documented the process well enough to follow. I so need for this to work: if it does, it will be perfect for what we need.

    Latest update:
    a. I let my server guys know about the additional databases maybe getting in the way, as I note above.
    b. I deactivated Membership.
    c. The extra databases were deleted and the WPWebhost folks checked on their end: the plugin names are as they should be, as you noted above.
    d. I reactivated Membership for the main blog - content still not restricted as it should be.
    e. Just on a whim, I deactivated and then reactivated it network-wide. same problem.

    I have to go teach a class in a few minutes, then will be offline for 2 hours, then back online to see what you'd like me to try next.

    I'm going to be peeved with myself if it was something simple that I needed to do!!! But that's not as important as getting it to work:slight_smile:




  • Mason
    • DEV MAN’s Sidekick

    Hiya Terri,

    Any further results? I know Barry has actually been working hard to get a new release of this plugin out very soon. He's juggling several things at the moment, but he'll be back soon with another idea.

    As for the 3 databases, nah a basic WPMU operates with one (unless you're specifically setting up multiple databases, but that's another story). The others shouldn't be causing interference, but it is weird that they have references to the membership plugin as well. Do each of the databases have the same username and password connected to them? That might be why? Anyway, you should be able to get rid of the other two, but I can't see how they'd be the cause of your problems. We'll keep looking, eh? ;D

  • Terrintokyo
    • Flash Drive

    Hi Mason:

    I have to admit to some frustration.
    I was waiting to see what Barry would suggest, but, since I haven't heard, I went to the next step.

    Here's my update:

    a. I deactivated & deleted the Membership plugin.
    b. I deleted the database tables as instructed.
    Please note: wp_options did not have these tables:
    option_name membership_active
    c. I installed Membership in 'mu-plugins' for my main blog.
    d. When I went to the Dashboard, 'Options' and 'Gateways' were still there.
    e. When I tried to create a level, even after clicking 'Add', the changes disappeared.

    I don't know what to do - I'm going to get grilled tomorrow morning about this and I really don't know what to do next. Could you ask Barry to look into it and let me know what might work now?

    I would be happy to give you access to check out the settings directly if that would help you guys to solve the problem today.

    Thanks very much.


  • Mason
    • DEV MAN’s Sidekick

    Please note: wp_options did not have these tables:
    option_name membership_active

    These tables should be there and are why the options and gateways were present when you re-installed. If you're using PHPMyAdmin, select the "wp_options" table from the sidebar. Click the "Browse" tab at the top of the page. Then, sort the table by "option_name" (you can click on this link and it will wort for you). Next scroll to the page the m's and check again for membership_active and membership_options. If you find them and want to try a fresh install, click the "x" next to both of these lines.

  • Terrintokyo
    • Flash Drive

    Hi Mason:

    Thanks for the detailed instructions on removing those tables. I followed the instructions, found the tables, and removed them

    Membership plugin reinstalled in 'plugins' folder.
    Edit Membership levels: can't do it. I set the levels, Add, and the page goes back to Edit Membership Levels: it simply doesn't show up.
    Edit Gateways: PayPal email information is still there (where in the database do I find these, so I can delete them?)

    I'm sorry, I can't keep working on this - I have to launch today, so I'm going to find a different membership solution.

    I'm going to keep on using WPMUDev themes and the other plugins, and putting so much time into this Membership issue has put my site production time behind considerably - I would so appreciate it if you can help me out with sample code for the video archives page that I describe here:

    I've tried to experiment with the php as Aaron suggests, but there's no time to keep experimenting: I just need the basic code. Then I can copy and paste it in, tweak a bit, and get the site moving.

    I'd be willing to bet other members would appreciate having this basic code, as well, since video is such a help to attract members.

    Thanks very much for all your help.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.