Page 1 of 1

Simple conditional link error in Firefox & Chrome

PostPosted: August 23rd, 2011, 6:44 pm
by fmini
I am brand new at this website thing but hope this isn't something stupid I am missing.

I am using the following simple conditional on my welcome page:

Code: Select all
<p style="text-align: center;"><strong><span style="font-family: times new roman,times; font-size: x-large;">Welcome, Thank You, and Congratulations.</span></strong></p>
<p><code>[hilite][s2If is_user_logged_in()][/hilite]</code>I spent about a thousand hours researching the information you are about to receive. I painstakingly placed everything in a logical order so you can populate, speed up, secure, and backup your new sites. I know you will be very happy with your decision and will enjoy the ease in which you can create, populate, speed up, secure, and backup your websites from now on. Please remember to recommend Start My Blog Now to anyone who would like to have their own website or blog and would like to know how to manage it on their own.<code></code></p>
<p style="text-align: left;">Thank you once again and now click <a href="http://www.startmyblognow.com/tutorial"><strong>On to the Tutorial! </strong></a>to get started.<code>[hilite][/s2If][/hilite]</code></p>


The link page http://www.startmyblognow.com/tutorial requires only level 0 but in firefox or chrome the link goes back to the payment options page regardless of level.

The link works perfectly in IE 8.

Do I need to do something special to make it work in firefox and chrome?

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 23rd, 2011, 10:45 pm
by Cristián Lávaque
The /tutorial page does send me to the Membership Options page since I'm not logged in and it requires Level 0. Do you have a test account at Level 0 I could login with to see the problem?

About the code you posted, I see your conditional shortcodes are wrapped in <code></code> tags. Do you have those in your post or did you add them here to emphasize the conditional?

Try it like this:

Code: Select all
<p style="text-align: center;"><strong><span style="font-family: times new roman,times; font-size: x-large;">Welcome, Thank You, and Congratulations.</span></strong></p>

[s2If is_user_logged_in()]
<p>I spent about a thousand hours researching the information you are about to receive. I painstakingly placed everything in a logical order so you can populate, speed up, secure, and backup your new sites. I know you will be very happy with your decision and will enjoy the ease in which you can create, populate, speed up, secure, and backup your websites from now on. Please remember to recommend Start My Blog Now to anyone who would like to have their own website or blog and would like to know how to manage it on their own.</p>

<p style="text-align: left;">Thank you once again and now click <strong><a href="http://www.startmyblognow.com/tutorial">On to the Tutorial!</a></strong> to get started.</p>
[/s2If]

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 24th, 2011, 9:29 am
by fmini
Sure do, thank you.

Username: Jo Password: Test = Level 0 user
Username: Level Password: One = Level 1 user

The code tags were in the post as well but I removed them and that does not resolve the issue.

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 25th, 2011, 1:48 am
by Cristián Lávaque
I see. Yes, that's weird. With either account I'm sent to the Membership Options Page (MOP) and the MOP var shows that the access required was Level 0, which either account should have. Also, when logged in, the MOP doesn't load fully.

Could you try as a test to use the TwentyTen or TwentyEleven theme? There may be a conflict with another plugin perhaps, have you tried deactivating them to see if the problem goes away? Also, have you edited the WordPress roles?

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 25th, 2011, 11:27 am
by fmini
I turned off all Plugins and changed to the Twenty Ten Theme (Current Theme is Twenty Eleven) and tested. Each scenario was the same:
1. All Plugins off (Twenty Eleven Theme)
a. Level 0
i. 503: Service Temporarily Unavailable
Too many IP addresses accessing one secure area!
Please contact Support if you require assistance.
b. Level 1
i. Return to MOP
2. All Plugins on (Twenty Ten Theme)
Same result
3. All Plugins Off (Twenty Ten Theme)
Same result

The 503: Service error is new but happens on the default setup even in IE8 now too. Not sure what this ones about because we are back to the original setup.

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 26th, 2011, 2:06 am
by Cristián Lávaque
That 503 is the unique IPs restriction. WP Admin -> s2Member -> Restriction Options -> Unique IP

Not sure what this ones about because we are back to the original setup.


You mean this is happening in a clean installation?

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 26th, 2011, 12:15 pm
by fmini
No, the only thing I did was change the theme and deactivate/reactivate all plugins except S2.

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 27th, 2011, 1:07 am
by Cristián Lávaque
Got it.

Could you check in the level 0 and level 1 profiles and tell me what role each has, please?

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 27th, 2011, 1:12 am
by fmini
sure can, level 0 is Subscriber and level 1 is s2Member Level 1

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 27th, 2011, 2:59 am
by Cristián Lávaque
Thanks. The roles are correct, the page is protected at Level 0 from what the MOP var tells, so I don't know what the reason is for users being redirected to the Membership Options page.

Could you try in another directory in the same server, a new installation of WordPress and with s2Member only and setting up a page protected at Level 0 and try access to it by a non-logged in user, a logged in Level 0 user and a logged in Level 1?

If you have the same problem in a clean install in the same server, then I'm guessing it could be a server configuration problem. If you don't have the problem in the clean install, then the problem is being caused by something that you or another plugin did.

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 29th, 2011, 3:22 pm
by fmini
Okay,
Clean install, eliminated level 0, created new welcome page and new MOP page with no simple conditionals at all. The new MOP page is startmyblognow.com/payment and all level 1 required pages redirect to http://startmyblognow.com/payment/?s2me ... evel_req=1 (same as /payment)
The new Welcome page is startmyblognow.com/letsgetstarted/ and once logged in, if you click the link to go to the tutorial which links as follows: <a href="http://www.startmyblognow.com/upandrunning">Now Let’s Get Started by clicking here. -- copied directly from firebug
You are redirected once again to http://startmyblognow.com/payment/?s2me ... evel_req=1
If you do not click the link in the body and instead click the links along the top of the page, they work fine.

The host is Host Gator and the problem still does not happen in IE8. The problem does happen in both Chrome 13.0.782.215 m and Firefox 6.0.

This is a simple site and I am going set it up without the link for now but figured you should have this information.

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 29th, 2011, 4:50 pm
by Cristián Lávaque
I think I see the problem now: www. viewtopic.php?f=36&t=1066

I hope that solves it. :)

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 29th, 2011, 5:05 pm
by fmini
You rock! That was it... thank you so much.

Re: Simple conditional link error in Firefox & Chrome

PostPosted: August 29th, 2011, 5:59 pm
by Cristián Lávaque
Awesome! I'm glad that solved it. Thanks for reporting back. :)