• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Store
    • Cart
    • Checkout
  • Blog
    • Basics [Free]
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Contact
  • Sign In
  • Show Search
Hide Search
Home » Blog » WP-Members 2.8.1 shortcode patch

WP-Members 2.8.1 shortcode patch

Chad Butler · Jan 16, 2013 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

I am always nervous about releasing updates to the plugin because in the back of my mind I am wondering what element slipped through the cracks.  The 2.8.1 release was no exception.

WP-Members 2.8.1 made it out the door with a small error related to the new “user-profile” shortcode.

The problem was with the logic in line 208 of wp-members-core.php:

$page = ( 'user-profile' ) ? 'members-area' : $page;

This would actually always return true, which would mean that all shortcodes using the “page” parameter would be members-area pages.  So register and login pages, while still being able to provide their core function, wouldn’t be working quite the way they should since they would have both the login and registration forms in the logged out state and wouldn’t have the correct links in the logged in state.

The fix (which has been implemented in the download already) is to change line 208 of wp-members-core.php to:

$page = ( $page == 'user-profile' ) ? 'members-area' : $page;

Blog, Release Announcements bug-fix

Welcome to RocketGeek Interactive › Forums › WP-Members 2.8.1 shortcode patch

  • This topic has 4 replies, 2 voices, and was last updated 8 years, 1 month ago by Chad Butler.
Viewing 4 reply threads
  • Author
    Posts
    • January 16, 2013 at 1:26 pm #1891
      Chad Butler
      Keymaster

      I am always nervous about releasing updates to the plugin because in the back of my mind I am wondering what element slipped through the cracks.  The
      [See the full post at: WP-Members 2.8.1 shortcode patch]

    • January 18, 2013 at 1:27 pm #1903
      dimber
      Participant

      Hi Chad,

      We installed 2.8.1 this morning and it does look like it contains the updated code for line 208. However, when a non-logged in user tries to view protected content, the page shows both the login form and the registration form immediately below it. We currently only want users to register via an invitation, so we’d like to not display the registration form which is was I thought it used to do before these plugin updates.

      Please advise.

      Thanks,
      Dave

    • January 18, 2013 at 2:40 pm #1904
      Chad Butler
      Keymaster

      Hi Dave,

      If it was downloaded and installed this morning, then you should have the patched version.

      If you don’t want the registration form, there is a toggle for this in the plugin’s options (“turn off registration”).  If you had this set before, upgrading should not have changed it.  Double check to be sure that’s checked (on) and if it is and you still get both the login & registration, let me know.  (Actually, let me know either way… 😉

    • January 18, 2013 at 3:28 pm #1907
      dimber
      Participant

      Hey Chad,

      I’m embarrassed. That solved the problem. I think I must have inadvertently unchecked that setting thinking that it would block ALL new users from registering including those who received an invitation with a link to our non-public registration form.

      Turning it back on solved the problem.

      Thanks!

      Dave

    • January 18, 2013 at 4:06 pm #1908
      Chad Butler
      Keymaster

      Glad that was it.

      I’ve thought for awhile that I need to rethink the wording on that setting.  In the very early going of the plugin, it actually was to turn of the plugin’s registration (back before there was a registration page shortcode), hence the wording.  The plugin has evolved since then.

  • Author
    Posts
Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Log In

Ready to get started?

Join Today!

© 2021 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Refund Policy