[Plugin: WP-Members] Bug in Sidebar redirect_to value. (4 posts)

  1. Sith Lord Goz
    Posted 4 years ago #

    First off - kudos for a great plugin! Once my client approves the site I am building using it, a $ donation shall be forthcoming (I promise!).

    I think I found a bug in the redirect_to value for the sidebar login form.

    wp-members-sidebar.php, line #71

    $post_to = get_page_uri( $page_id );

    This returns the relative URI, so if you are on, say, http://www.example.com/registration, the value stored will be 'registration'. So when you login and it redirects, you get sent to http://www.example.com/registration/registration - and get a 404.

    I think it would be better to be:

    $post_to = home_url().'/'.get_page_uri( $page_id );

    So that the full path is included - just like you have in the other catch statements for is_single, is_category etc.

    Hope that helps!

  2. Sith Lord Goz
    Posted 4 years ago #

    Also I believe <legend> and <fieldset> should be inside the <form> tag, not outside (occurs in multiple wp-members-*.php files)

  3. Chad Butler
    Posted 4 years ago #

    Thanks for that suggestion. I had actually made a change for the is_home case as there are some challenges there as well. I'll test this out and include it.

    regarding the form, that's probably better form. I'll evaluate... Thanks for pointing that out. (It should just be in the wp-members-dialogs.php)

  4. gtrout
    Posted 4 years ago #

    I was having a problem with the login widget returning me to a post detail page because of the is_home condition in wp-members-sidebar.php:73. This was because I'm using the Showcase Template from Twentyeleven. I changed the first if statement to use is_front_page instead and it seems to work fine.

    Thanks for the great plugin and awesome community participation. Devs like you are what WP is all about.

Topic Closed

This topic has been closed to new replies.

About this Topic