Page 1 of 1

I Broke s2member_force_ssl ... no longer caches other files

PostPosted: July 4th, 2011, 6:37 pm
by BobTabor
Yesterday I was using:

WordPress 3.1.3

I upgraded today to:

WordPress 3.1.4

After updating, this Custom Field setting:

s2member_force_ssl --> yes

... will continue to append the correct querystring parameter like so:

https://members.learnvisualstudio.net/?s2-ssl=yes

However, unlike yesterday the page's other resources are not being cached. So, in Google Chrome, instead of coming up with a pretty green lock, I see the evil red icon instead (see attached image) because other files (images, javascript files, etc.) are not also being sent through SSL.

Any ideas on what I can try?
Thanks!
Bob

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 4th, 2011, 6:38 pm
by BobTabor
Actually, that's not all ... additionally it is ignoring the the Welcome page replacement-code scheme. I.e.,:

http://members.learnvisualstudio.net/welcome-%%current_user_level%%

... no longer works. The user is routed to their WordPress Profile page after login.

I've tried a few obvious things like removing this setting from the page in question and adding it back in. No luck. I'm using Rackspace CloudSites. I feel like it may just need a "reset", but not sure how to accomplish that.

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 4th, 2011, 9:44 pm
by Cristián Lávaque
I tried https://members.learnvisualstudio.net/?s2-ssl=yes with Firefox and didn't have any warnings about the certificate. I looked at the source code and couldn't see a resource without SSL.

About the login welcome redirection, is it still there in the settings? WP Admin -> s2Member -> General Options -> Login Welcome Page

Have you watched this video before? Does it help now? http://www.s2member.com/login-welcome-p ... cts-video/

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 5th, 2011, 9:46 am
by BobTabor
Hi Cristian, thanks again for looking into my issues.

I still do get the SSL warnings in certain situations. I can't isolate it yet, but as soon as I can figure out the exact steps I'll let you know.

Equally distressing is that the custom welcome page is completely broken. No matter what I set here:

s2Member --> General Options --> Login Welcome Page

It is completely ignored upon log in.

I tried upgrading to WordPress 3.2 this morning in a desperate attempt to jar something loose (as if!)

I also have attempted setting the Login Welcome Page to a fixed page on the site (like the FAQ), tried removing and re-entering the replacement code:

http://members.learnvisualstudio.net/welcome-%%current_user_level%%

etc. It just will not respond no matter what.

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 5th, 2011, 12:29 pm
by BobTabor
Well I figured it out. The good news for me is that the fix is easy. The bad news is that there's a bug in someone's code (I'm thinking WordPress since it's their login system).

Ok, so I imported 30,000 users. Most users use an email address or some alpha-numeric combination. Some users used all numbers in their username.

Here's two examples:

1334
105881

... and so while we were testing all this, we randomly picked those two users and got the results I mentioned above.

Well, after curling up in the fetal position for an hour, I started to look through the MySQL export of the database. I started doing a search to see what the SQL looked like for those users. It was then I discovered that there were rows that had UserID and MetaUserID values matching those usernames (because, again, they are numbers).

So, I'm guessing WordPress (?) does some wacky lookups for login that somehow involve these fields, but gets confused when the username is a number matching userid's or metauserid's in the database. I don't know.

So, the moral of the story is that if you conduct an import of a large number of users be wary and know that any weirdness may be due to the data and the denormalized/pivoted nature of WordPress' user meta data.

I hope this was helpful for someone in the future.

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 5th, 2011, 1:39 pm
by Cristián Lávaque
I'm so glad you sorted it all out! And thank you for the heads up on the integer usernames! I'll notify Jason so he takes a look at that. Thanks Bob! :)

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 5th, 2011, 1:44 pm
by BobTabor
Another FYI: we found that when you import usernames that have spaces, the spaces are removed during import. It's not a bug per se, just another thing to be aware of ... we're having to notify 275 users that their user names will be different in the new system.

Re: I Broke s2member_force_ssl ... no longer caches other fi

PostPosted: July 5th, 2011, 7:17 pm
by Jason Caldwell
Thanks for reporting this important issue.
~ and thanks for reporting your experience too, MUCH appreciated!

Yes, s2Member/WordPress will apply this function to all imported Usernames.
http://codex.wordpress.org/Function_Ref ... itize_user

Strict mode is automatically enabled on a Multisite Network installation. In general, it is best to have all Usernames start with a character [a-z], and to only contain alphanumerics and underscores. This is a WordPress standard, and s2Member follows suit. Spaces are not allowed.