Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-10T18:29:29-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6240 2011-05-10T18:29:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14591#p14591 <![CDATA[Re: Safari is redirected to login]]> I agree with Cristián's hack.
Until the next release comes out, I recommend creating this file and directory.
( this hack can be deleted once the next release is available )

/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_filter
('ws_plugin__s2member_content_redirect_status', 'content_redirect_status');
function content_redirect_status($status = 301) { 
    if 
((int)$status === 301 && !empty($_SERVER['HTTP_USER_AGENT']) && preg_match('~(msie|trident|gecko|webkit|presto|konqueror|playstation)[/ ]([0-9\.]+)~i', $_SERVER['HTTP_USER_AGENT']))
        return ($status = 302); 
}
?>
* When implemented like this, there should be no negative side effects.

Statistics: Posted by Jason Caldwell — May 10th, 2011, 6:29 pm


]]>
2011-05-10T14:08:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14541#p14541 <![CDATA[Re: Safari is redirected to login]]>

You could try this in your hack in the meantime. Note: I haven't tested it.

Code:
<?php
add_filter
('ws_plugin__s2member_content_redirect_status', 'content_redirect_status');
function content_redirect_status($status = 301) { 
    if 
((int)$status === 301 && !empty($_SERVER['HTTP_USER_AGENT']) && preg_match('~(msie|trident|gecko|webkit|presto|konqueror|playstation)[/ ]([0-9\.]+)~i', $_SERVER['HTTP_USER_AGENT']))
        return ($status = 302); 
}
?>


I hope it helps.

Statistics: Posted by Cristián Lávaque — May 10th, 2011, 2:08 pm


]]>
2011-05-10T13:22:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14532#p14532 <![CDATA[Re: Safari is redirected to login]]> Statistics: Posted by AnnaSkye — May 10th, 2011, 1:22 pm


]]>
2011-05-10T11:45:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14513#p14513 <![CDATA[Re: Safari is redirected to login]]>

Statistics: Posted by Cristián Lávaque — May 10th, 2011, 11:45 am


]]>
2011-05-09T23:22:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14497#p14497 <![CDATA[Re: Safari is redirected to login]]>
Thanks,
AnnaSkye

Statistics: Posted by AnnaSkye — May 9th, 2011, 11:22 pm


]]>
2011-05-04T15:54:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14120#p14120 <![CDATA[Re: Safari is redirected to login]]> Thanks for the follow-up.
tkittredge wrote:
Correct me if I am wrong, but with a status of 302, search engines and crawlers would simply index and reindex the MOP but still be unable to access restricted content.

Thanks for the response to a challenging issue.

Yes, you are absolutely correct.

However, with 302s, I've seen spiders end up with a set of search results like this:
Code:
Membership Options Page
http://example.com/protected-page-1/

Membership Options Page
http://example.com/protected-page-2/

Membership Options Page
http://example.com/protected-page-3/

Membership Options Page
http://example.com/protected-page-4/
Ultimately resulting in duplicate content warnings.

I think the detection of search engine crawlers/spiders should work nicely though. We'll get this updated in the next release. That way browsers get 302 redirects, but spiders/crawlers get 301 redirects.

Statistics: Posted by Jason Caldwell — May 4th, 2011, 3:54 pm


]]>
2011-05-04T15:09:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14112#p14112 <![CDATA[Re: Safari is redirected to login]]> viewtopic.php?f=4&t=6281

Correct me if I am wrong, but with a status of 302, search engines and crawlers would simply index and reindex the MOP but still be unable to access restricted content.

Thanks for the response to a challenging issue.

Statistics: Posted by tkittredge — May 4th, 2011, 3:09 pm


]]>
2011-05-04T11:24:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14088#p14088 <![CDATA[Re: Safari is redirected to login]]>

Statistics: Posted by Cristián Lávaque — May 4th, 2011, 11:24 am


]]>
2011-05-04T09:16:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14084#p14084 <![CDATA[Re: Safari is redirected to login]]>
100% Resolved ( update coming in next release )

Statistics: Posted by Jason Caldwell — May 4th, 2011, 9:16 am


]]>
2011-05-04T01:22:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14071#p14071 <![CDATA[Re: Safari is redirected to login]]>
But I'd still give the 301 to browsers that handle it properly, or would you rather prevent new unexpected behaviors as Safari's?

Statistics: Posted by Cristián Lávaque — May 4th, 2011, 1:22 am


]]>
2011-05-03T23:38:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14057#p14057 <![CDATA[Re: Safari is redirected to login]]> Statistics: Posted by Jason Caldwell — May 3rd, 2011, 11:38 pm


]]>
2011-05-03T23:29:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14052#p14052 <![CDATA[Re: Safari is redirected to login]]> Statistics: Posted by Cristián Lávaque — May 3rd, 2011, 11:29 pm


]]>
2011-05-03T21:43:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14026#p14026 <![CDATA[Re: Safari is redirected to login]]> The hack worked for me.

Just a suggestion, way do a redirect in the first place. For us, I don't want Google to index my members only URLs.

Could you insert content into the request.

Let's say s2Member had a configuration option that would allow you to assign default content to be displayed when a user doesn't have the correct access level. This content could come from pages or post, even hand coded option in s2Member settings for each level.

For spiders/crawlers, write a robot.txt with your members only content urls not allowing them to be index.
Could s2Member write the file?

Thanks
-Daniel

Statistics: Posted by dwllnet — May 3rd, 2011, 9:43 pm


]]>
2011-05-03T20:26:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14017#p14017 <![CDATA[Re: Safari is redirected to login]]> Thank you.

I'm still testing this, but I suspect it's related to 301 permanent redirects implemented by s2Member. My research shows that some versions of Safari will cache a 301 redirection, even though WordPress/s2Member sends no-cache headers before the redirection.

This is unexpected behavior, because most browsers will respect no-cache headers, and NOT cache the redirection. However, a gray area emerges on this according to the specs, so we may need to seek an alternative solution; in order to avoid this possible bug in Safari.

In fact, some articles I researched mention that Safari might even cache this into memory;
making it difficult to clear with common techniques ( i.e. Safari -> Empty Cache ).


A possible solution.
90% Resolved ( pending a full resolution though )

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_filter
("ws_plugin__s2member_content_redirect_status", "content_redirect_status");
    function content_redirect_status($status = 301){ return ($status = 302); }
?>
* But please note. This has a potentially harmful side effect. s2Member sends a 301 redirect status ( by default ), in order to avoid duplicate content issues with search engine spiders/crawlers.

By using a permanent redirect ( 301 status ), s2Member tells search engines NOT to index protected pages of your site, which would only redirect to the Membership Options Page anyway. This is why 301 redirects are recommended for protected pages that are redirected.

If you use a 302 redirect instead, you might avoid this Safari issue; but Google might try to index all of your protected URLs then, which would only lead a search engine to the same page over and over again ( i.e. your Membership Options Page ).


I'm open to suggestions/feedback on this topic please.

See Also: http://stackoverflow.com/questions/2954 ... 1-redirect

Statistics: Posted by Jason Caldwell — May 3rd, 2011, 8:26 pm


]]>
2011-05-03T19:22:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14014#p14014 <![CDATA[Re: Safari is redirected to login]]>
Thanks again.
-Daniel

Statistics: Posted by dwllnet — May 3rd, 2011, 7:22 pm


]]>
2011-05-03T19:07:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=14013#p14013 <![CDATA[Re: Safari is redirected to login]]> Investigating now.
Thanks for the details guys.

Statistics: Posted by Jason Caldwell — May 3rd, 2011, 7:07 pm


]]>
2011-05-03T06:25:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13981#p13981 <![CDATA[Re: Safari is redirected to login]]>
See example links under "Platform" and "Configuration" at... viewtopic.php?f=4&t=6281#p13960

Statistics: Posted by tkittredge — May 3rd, 2011, 6:25 am


]]>
2011-05-03T00:28:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13968#p13968 <![CDATA[Re: Safari is redirected to login]]>
I've updated WP Permalink Settings from Custom Structure "/%category%/%postname%/" to WP's default settings, p=123.

My testing shows Safari doesn't redirect under this config.

Can some one verify this?

Thanks
-Daniel

Statistics: Posted by dwllnet — May 3rd, 2011, 12:28 am


]]>
2011-05-02T23:36:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13965#p13965 <![CDATA[Re: Safari is redirected to login]]> viewtopic.php?f=4&t=6281

Simply... Any individual restricted page "touched" AFTER dumping the browser cache (Safari, Empty Cache...) but BEFORE login will not be accessible after log in. Those untouched will be accessible.

Let mew know if I can provide more details.

Statistics: Posted by tkittredge — May 2nd, 2011, 11:36 pm


]]>
2011-05-02T20:20:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13962#p13962 <![CDATA[Re: Safari is redirected to login]]> Testing different s2Member configureations.

I've changed s2Member's ACLs from Category to Page,Post with the key word all.
Under Safari I'm seeing the same results.

But one weird behavior is that the Login Welcome Page works as it should.
Thanks
-Daniel

Statistics: Posted by dwllnet — May 2nd, 2011, 8:20 pm


]]>
2011-05-02T10:28:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13944#p13944 <![CDATA[Re: Safari is redirected to login]]> Login into the test site, access http://[Test Site]/welcome/ click on "You may now order online.".
On Safari it will redirect you back to the login screen.

Thanks
-Daniel

Statistics: Posted by dwllnet — May 2nd, 2011, 10:28 am


]]>
2011-05-02T09:26:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13940#p13940 <![CDATA[Re: Safari is redirected to login]]>
You should have received an email with the password.

Safari 5.0.5 and 5.0.4 on OS X, have not tried Safari on Windows.

Thanks
-Daniel

Statistics: Posted by dwllnet — May 2nd, 2011, 9:26 am


]]>
2011-04-30T08:21:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13865#p13865 <![CDATA[Re: Safari is redirected to login]]> Thanks Daniel. I just created an account on your site with Username: jasontest
Please upgrade me to Level #4 and provide me with instructions on how to reproduce this in Safari. Also, can you please tell me which version of Safari this problem occurred with, and was this running on a Mac, or Safari for Windows?

Statistics: Posted by Jason Caldwell — April 30th, 2011, 8:21 am


]]>
2011-04-30T07:27:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13861#p13861 <![CDATA[Re: Safari is redirected to login]]> Yes, I have read that post.
We use the host name www in all of our URLs.
WordPress address (URL): http://www.laramyk.com
Site address (URL): http://www.laramyk.com

I've removed all caching plugins. The weird thing is that it's just Safari.

Also, we have a testing site, we can do about anything you want.

Thanks for the help.
-Daniel

Statistics: Posted by dwllnet — April 30th, 2011, 7:27 am


]]>
2011-04-30T06:58:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6240&p=13859#p13859 <![CDATA[Re: Safari is redirected to login]]> Hi Daniel. Have you seen this post regarding www vs. without?
viewtopic.php?f=36&t=1066

The fact that it's a browser issue, suggests that it's either a cache plugin causing confusion for you, or that it's a cookie issue, possibly related to the www issue I mention in that thread. Please report back if you can. I can confirm that all of my tests in Safari seem fine, but I would like to get to the bottom of this. Thanks in advance for your patience.

Statistics: Posted by Jason Caldwell — April 30th, 2011, 6:58 am


]]>