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™

Restricted area redirect to blank page for free members

s2Member Plugin. A Membership plugin for WordPress®.

Restricted area redirect to blank page for free members

Postby tourdecartes » December 5th, 2011, 7:27 pm

Hello,

I could see that when a free member is trying to access a restricted area, he is redirected to a blank pas with this url: http://www.mydomain.com/abonnements?_s2 ... evel_req=1

I would like them to be redirected to the membership option page so they can upgrade but it wont work.
However I can see that when a visitor is not registered at all, the redirect works like a charm.

Anyone would have an idea why that is and how can i make it right again?

Thanks again for the help :)

Manu


PS: A huge thanks to the team and everyone who help out by the way! This is just the best plugin!
User avatar
tourdecartes
Registered User
Registered User
 
Posts: 5
Joined: December 3, 2011

Re: Restricted area redirect to blank page for free members

Postby Eduan » December 5th, 2011, 10:36 pm

Did you set the page so that it requires a certain level?
And are you logging out of your admin account before doing the test?
I suggest you make a new user with a certain user level and try logging in as that user.

Hope this helps. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Restricted area redirect to blank page for free members

Postby tourdecartes » December 6th, 2011, 1:14 am

Hello Eduan,

Thanks for taking the time to answer.

Yes the page is level 1 and i tried to access a level1 post with my test account level 0 (free). I was expecting to be redirected to the member option page to a able to upgrade but instead i had a blank page.
The thing is the redirect works if im not logged in into any account at all...
User avatar
tourdecartes
Registered User
Registered User
 
Posts: 5
Joined: December 3, 2011

Re: Restricted area redirect to blank page for free members

Postby epixmedia » December 6th, 2011, 5:03 am

Hi tourdecartes, you could try placing some text between this shortcode in your page, like so:
[s2If !is_user_logged_in()]
Some public content. They're NOT logged in.
A leading !exclamation means false.
[/s2If]

This would only show to users that are not logged in and could contain links that take them to the login and/or registration pages.

Its odd its not redirecting though as mine does... Have you set you registration default page in the s2member settings?
User avatar
epixmedia
Registered User
Registered User
 
Posts: 59
Joined: November 15, 2011

Re: Restricted area redirect to blank page for free members

Postby Eduan » December 6th, 2011, 9:17 am

The code that epixmedia showed you can be found under WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals.

Also, that code doesn't redirect the user if he's logged out, it just doesn't show the content if the user doesn't have the right level, so they would see a blank page.

These shortcodes are usually used on the Membership Options Page / Login Welcome Page so that users get different content based on their level.

Have you set everything that has to do with s2Member under WP Admin -> s2Member -> General Options? If not everything please do and tell us how it goes.

Hope this helps. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Restricted area redirect to blank page for free members

Postby tourdecartes » December 6th, 2011, 12:42 pm

Hello,

The issue is fixed! It was created by the "Secure WordPress" plugin.
Apparently it was considering the request as a bad query and was just blocking it.
I just deactivated the "Secure WordPress" plugin and everything went back to normal.

Thanks a lot for your time, your help was really appreciated!

Emmanuel
User avatar
tourdecartes
Registered User
Registered User
 
Posts: 5
Joined: December 3, 2011

Re: Restricted area redirect to blank page for free members

Postby Eduan » December 6th, 2011, 1:02 pm

OK, glad it works now.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Restricted area redirect to blank page for free members

Postby emvaughn » February 2nd, 2012, 10:12 pm

Just FYI Emmanuel,

There is a setting in Secure Wordpress that you can uncheck to fix the issue. If it was a plugin you wish to keep using simply uncheck the option that says, "Block bad queries - Protect WordPress against malicious URL requests." I ran into the same issue!
User avatar
emvaughn
Registered User
Registered User
 
Posts: 1
Joined: January 7, 2012


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

cron