my no access message is not showing

Pages are hidden in the top menu for my site as expected using Membership plugin but the problem is the Blogs-Mu theme also have links on the home page, i.e “Find Out More” links that are linked to these hidden pages so when they click on those links they get.

“Sorry, we can’t find the content you’re looking for at this URL. Please try selecting a menu item from above or to the side of this message to get where you’d like to go.”

I will like to use my own custom message instead in the plugin so I tried Edit/Options. I have “protected content page” set to “None”. For “Message Title” I have “No Access” then I added a protected message in that box. I thought my message should show in place of the one above.

How do I make this work?

Per the client’s request I cannot show the actual site.

Thanks for any help

  • Mason
    • DEV MAN’s Sidekick

    Hiya drdave,

    I haven’t had a chance to really play with the membership plugin and each individual theme, but I am able to create a setup and produce similar results to your own.

    Maybe Barry or Richie can stop by and comment on this one as it’s specific to this plugin/theme combination. If I have a moment, I’ll dig a bit deeper and see what I can find as well.

    Thanks! :smiley:

  • drdave
    • The Crimson Coder

    As a work around I wrapped this around each code…

    <?php if ( is_user_logged_in() ) { //check user are now loggedin ?>

    <?php } ?>

    to hide those “Find Out More” links on the home page. Since I found a way to remove them I figured best not to have them show for non-logged in visitors.

    I had to hunt down and find the service-mode.php, the script responsible for those links. The code was recommended by Ritchie in another post. Seems to work well so I also applied it to the Main Nav menus, Activity, Groups, Forums Blogs, the ones I asked you about in another post here https://wpmudev.com/forums/topic/trying-to-hide-some-menus. So far so good.

    However, one problem remain. When any of the six group icons is clicked on the home page by a non-logged in visitor, the group info don’t show up. It just display a blank section on the bottom. Please see image to clarify.

    However, I will still like to use my own custom message for this if possible with membership plugin Edit/Options. Again I have “protected content page” set to “None”. For “Message Title” I have “No Access” then I added a protected message but it’s not working.

    Help appreciated.

  • Mason
    • DEV MAN’s Sidekick

    Hiya!

    Nice work around! Yeah, the is_user_logged_in() function is very handy in these situations. Barry or Richie should be by before too long and can give some input on the blank page showing for guests when they click on the image.

    Thanks for posting your findings thus far! :smiley:

  • drdave
    • The Crimson Coder

    I am planning on just reinstalling the membership plugin. Currently I am only testing it. It is possible I could have done something wrong in the process.

    But as I read the other posts on uninstalling membership, and I guess a good general rule to go by, is to drop/delete related tables after I delete this plugin.

    I tried finding some docs here before screwing things up. Nothing found. If I can get some directions I might just delete the plugin, clean up the database and try again but some advise before I get started would be great.

    Also is this a general rule to go by for each plugin uninstalled? I noticed it seems fragments of stuff still get left back after uninstalling and reinstalling a plugin. But by now I lost track of most of the ones I already deleted so my database must be full of junk so if i can also clean that up would be great. I have done the optimize database before but not sure if that’s enough.

    Just the fact that you decided to help us even on the weekend cannot be appreciated enough.

    Thanks again masonjames

  • Mason
    • DEV MAN’s Sidekick

    Hiya drdave,

    Going for a clean install is not a bad idea. It’s definitely good that you’re testing this all out ahead of time to find the best solution for your projects needs.

    The Membership plugin is pretty advanced and so does enter quite a bit of information in the database. I’m not sure of a complete listing of these tables, but they’ll be anything with “_m_” after your wordpress database prefix. A quick look on my install shows the following:

    wp_m_membership_levels

    wp_m_membership_news

    wp_m_membership_relationships

    wp_m_membership_rules

    wp_m_membership_transaction

    wp_m_subscriptions

    wp_m_subscription_levels

    You may or may not have all of these tables, but they should be removed if they exist. There may also be some entires in the wp_options (again search for “_m_”:wink:. Barry has given some information on this in the thread here:

    https://wpmudev.com/forums/topic/membership-plugin-rc3

  • drdave
    • The Crimson Coder

    @Joseff I am going for the reinstall but I still want to edit that error message. It is not in index.php or any of the 404 php pages.

    @masonjames I am doing a simulated run

    1. delete the plugin

    2. Go to phpMyAdmin

    3. Select my site database

    4. I see about 30 plus _m_ entries. I select them all and with selected drop?

    I also want to optimize the database so I guess it’s also safe to do so after I uninstall all my unwanted plugins by doing “Select All/Optimize Tables”. I guess that gets rid of all the overhead stuff from the constant adding and deleting files over time.

    Let me know

    Thanks

  • Mason
    • DEV MAN’s Sidekick

    Hiya!

    @drdave,

    4. I see about 30 plus _m_ entries. I select them all and with selected drop?

    You got it. Anything with “_m_” if you’ve been using the same database over the course of the BETA life of this plugin that would explain multiple entries. ;D

  • drdave
    • The Crimson Coder

    @Barry

    Did a rough estimate actually 23 total. Lots of repeats.

    wp_44_m_membership_news

    wp_45_m_membership_news

    wp_61_m_membership_levels

    wp_61_m_membership_news

    wp_61_m_membership_relationships

    wp_61_m_membership_rules

    wp_61_m_subscriptions

    wp_61_m_subscriptions_levels

    wp_61_m_subscription_transaction

    wp_82_m_membership_levels

    wp_82_m_membership_news

    wp_82_m_membership_relationships

    wp_82_m_membership_rules

    wp_82_m_subscriptions

    wp_82_m_subscriptions_levels

    wp_82_m_subscription_transaction

    wp_m_membership_levels

    wp_m_membership_news

    wp_m_membership_relationships

    wp_m_membership_rules

    wp_m_subscriptions

    wp_m_subscriptions_levels

    wp_m_subscription_transaction