PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Login Welcome Page Bug

s2Member Plugin. A Membership plugin for WordPress®.

Login Welcome Page Bug

Postby wesleysoccer » May 7th, 2011, 1:27 pm

Ok..So When you set the login welcome page at http://www.example.com/%%current_user_login%% and set your Members options page to any page, you will not be able to access your homepage when not logged in...I've tested for over two hours with different themes and no plugins running but S2member...I can send you a demo if you want...would love a fix :) Thanks.

This was without any plugins installed and using the default wp twenty ten theme and using the latest version of wp 3.1.2

url: http://www.estore.muntzdesigns.com - demo site

Any help would be awesome!
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 7th, 2011, 2:50 pm

It's great that you did more tests and were able to define the problem more clearly.

I wonder if s2Member takes http://www.example.com as a possible Login Welcome Page too in case the replacement code is empty... That would explain the sending to the Membership Options Page, since the Login Welcome one is protected by default.

Could you change your portal so that instead of /username it's /user/username and see if that fixes your homepage problem?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby wesleysoccer » May 7th, 2011, 6:00 pm

I can but this is not how the video explained it...plus how would I set the welcome page in general options: (http://www.vinitasalomeblog.com/demo/%%current_user_login%%)...Plus I can't change my portal pages to /user/username (not able to do so)... Let me know,

please inform the developer of the issue...I will test and get right back but right now there is an issue...need a fix.
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011

Re: Login Welcome Page Bug

Postby wesleysoccer » May 7th, 2011, 7:52 pm

Update Client Portal: The homepage issue was fixed with the following like you stated above...The Welcome page is set like: http://www.example.com/user/%%current_user_login%% - The video does not state this?

Next Question: At the Current User Login Welcome Page, I need to add a link to a second page just for that current logged in user...how can I link to that page using the current_user_login and custom capabilities?

For example the second page is a gallery page...How would I link to that page?
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 7th, 2011, 9:05 pm

I'm glad it solved your homepage problem. :)

You posted about the gallery link in another thread, let's keep it there. I remember answering it, but if I missed something, please remind me or give me more details. Thanks!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby Jason Caldwell » May 10th, 2011, 4:25 pm

Thanks for reporting this important issue.
~ and thanks for bringing this to my attention Cristián.

Yes, this is a bug ( of sorts ). s2Member will attempt to resolve the Replacement Codes in your Special Redirection URL. If the Redirection URL contains only one Replacement Code for %%current_user_login%% and that Replacement Code resolves to being empty, it makes s2Member think the Home Page is the Login Welcome Page; and thus, s2Member protects it.

@TODO: default %%current_user_login%% and other Replacement Codes to generic values when they would otherwise resolve to null? Cristián, do you have any thoughts on this?
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 10th, 2011, 4:32 pm

I don't know if a default will work ideally. I'd probably just document the replacement codes better explaining this behavior, and the Login Welcome Page explaining what'll happen if set to the homepage or some other special one that could result in unexpected behavior. What do you think?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby Jason Caldwell » May 10th, 2011, 4:40 pm

Yes, I agree with you. Defaulting these to generic values is actually just introducing more confusion. Yes, improved documentation is always a good idea. Perhaps we also need a secondary routine to prevent s2Member from resolving any Special Redirection URL to the home page too. Just to prevent this particular issue from occurring? All other aspects of s2Member assume the Home Page is NOT going to be protected. In fact, apart from this newly reported bug, the only other way to protect the Home Page, is by using the URI Restrictions trick of adding a single ( / ) mark.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 10th, 2011, 5:03 pm

Cool.

I don't know if someone will want to protect the homepage, though, so I would not make it impossible.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby Jason Caldwell » May 10th, 2011, 5:08 pm

Gotchya. Completely agree. Aside from this newly reported bug, the only way to protect the Home Page, is by protecting the entire site using a single slash in one of the URI Restriction boxes. We may add other techniques in the future, but in light of this new bug, I think we'll add an additional routine to guard against Home Page protection occurring inadvertently through a Special Redirection URL.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 10th, 2011, 5:13 pm

Got it.

Yeah, we don't want it to happen unknowingly, for sure. :)

Instead of having the routime prevent, it could just warn when saving the new setting, then let the admin decide if he changes or leaves it. Would this be more difficult?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 10th, 2011, 5:16 pm

Or going back to the default value idea: it could be possible to set a page for the Login Welcome Page and also a Special URL, so that if the replacement code doesn't have a valid value, it defaults to the page chosen.

Edit: Nevermind, the deafult page works well for an invalid URL, but not for invalid replacement code values cause they could still be in a valid URL (e.g. http://example.com/?optional=%%replacement_code%%)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby wesleysoccer » May 10th, 2011, 6:13 pm

Thanks for all the feedback guys...I'm going to do a screencast soon for using wordpress as a client portal...I just completed one project for my client (photography portal) and will be using s2member to another client soon (another client portal). I have everything working real smooth with login and recognizing specific usernames throughout the site using the same links for all users..Thanks so much guys...There are not to many options for a client portal with wordpress (if any)...Except for using like four plugins...too much...
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011

Re: Login Welcome Page Bug

Postby wesleysoccer » May 11th, 2011, 8:34 am

Another little issue that I have discovered when using the portal...When the "admin" is setting up pages and set the custom capabilities, the admin is unable to view the page edits...this is because they are "admin" not the "username" set at custom capabilities...Thanks guys.
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 11th, 2011, 11:52 am

An admin doesn't have any access restriction applied to him by s2Member. You probably are seeing a cache copy of the page instead of the changed one.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby wesleysoccer » May 11th, 2011, 12:10 pm

yeah...want's the page is set with custom capabilities for the portal you are unable to view the page...ugh..I cleared cache and still you can't view page as admin....
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011

Re: Login Welcome Page Bug

Postby Cristián Lávaque » May 11th, 2011, 12:33 pm

OK, that's really strange. Let's wait for Jason to comment then.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login Welcome Page Bug

Postby drbyte » May 11th, 2011, 5:51 pm

If you setup the theme to use a custom capability levels 0 to 4 (current_user_can(capability)) then the admin will not be able to see it.

Will not work
current_user_can(access_s2member_level0) or 1, 2, 3, 4

Will Work
is_user_logged_in

You can use multiple Conditionals && is_admin() or is_super_admin

If you are not using any of the above directly in your theme then create another admin user and try to log in and see if your see the changes.

If you are getting a full white page then you might want to check some pages including your .htaccess
Another, if permalinks are used, then you might want to hit the Save Changes button couple of times..it might just be a small hiccup

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Login Welcome Page Bug

Postby wesleysoccer » May 11th, 2011, 7:22 pm

Thanks for the information ..I will take a look..When I try to view the page after edits I get directed to members option page,,,Thanks.
User avatar
wesleysoccer
Registered User
Registered User
 
Posts: 83
Joined: January 31, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 3 guests

cron