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™

Blank Pages

s2Member Plugin. A Membership plugin for WordPress®.

Blank Pages

Postby amelen » December 13th, 2011, 6:34 pm

Hi,
We're currently working on an installation of s2Memebers on a custom theme(Which might be the problem, but read on just in case.).

We followed the video tutorials, assigned what pages were protected, where the login page is, where the members page is, etc. However, when someone(Logged in, or logged out.) comes to the site fresh, or attempts to view protected view, it does the following-

1: Does not redirect.

2: If you go directly to the login page or member page, you find nothing but a blank page where the content should be, with our sites regular header and footer.

I can supply a link, if needed, however I want to make sure I haven't done something wrong first.

Any help would be appreciated.

Information of site:
Wordpress Version: 3.3
s2Memeber version: 111206
User avatar
amelen
Registered User
Registered User
 
Posts: 3
Joined: December 13, 2011

Re: Blank Pages

Postby Cristián Lávaque » December 16th, 2011, 4:04 am

So, you mean you protected a page/post with a level restriction and then went to view the page and you weren't prevented from loading it although you were logged out? Could you double check that the page is actually restricted? In the pages list under WP Admin -> Pages -> All, there would be an lock to the far right of the row for that page, if you hover over it with the pointer you should be told what restriction it has.

By Login page and Member page, do you mean the Login Welcome page and Membership Option page you created to use with s2Member? s2Member doesn't add content to them, just sends people there. You'll have to add the content yourself as with any other page you create in WordPress.

I hope that helps. :)
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: Blank Pages

Postby amelen » December 16th, 2011, 3:09 pm

Hi Cristián,

I appreciate the help. I checked everything you suggested and even ran through the video guides again to make sure, but alas nothing seems to be working.

To better clarify-

Lets say you first visit the sit, not logged in. When you click on a page that is restricted the page loads up just fine. If you go to either the member page or the login page, no redirection to a register form nor a login form shows, simply a blank page.

We've defined those pages in the settings, checked it again even and its still reacting the same. Unfortunately we're in a bit of a rush as this was the last stage of the site development and we're looking at Monday as our absolute deadline.

Thanks again for the help :)
User avatar
amelen
Registered User
Registered User
 
Posts: 3
Joined: December 13, 2011

Re: Blank Pages

Postby Cristián Lávaque » December 19th, 2011, 3:45 am

Hmm... It could be a plugin conflict. Could you deactivate other plugins one by one and check after each to see if the problem went away with it? If you find a plugin causing the problem, then you can look for an alternative or contact the developer to improve it.

The theme is another possible cause, so you can change to the default one as a test, but from what you tell me I'd be inclined to think plugin.

Other than that, I don't know why you'd have that problem. It doesn't do that in a clean installation of WordPress.

I hope that helps.
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: Blank Pages

Postby amelen » December 19th, 2011, 9:31 am

Hi,

We've installed it on a clean installation of wordpress, no plugin conflicts. We're thinking its the theme, as it was a custom design coded specifically for us. Still a bit odd.
User avatar
amelen
Registered User
Registered User
 
Posts: 3
Joined: December 13, 2011

Re: Blank Pages

Postby Cristián Lávaque » December 19th, 2011, 11:02 pm

This is part of a conversation I had with Jason some months ago regarding JavaScript conflicts.

Cristián: I still don't understand how the JS conflicts work... If the library is the same in both plugins, why is there a conflict? Same var names?

Jason Caldwell: Well, I call it a conflict. Sometimes it's a conflict in jQuery because of a bad plugin, which attempts to load jQuery on it's own, instead of doing it the WP way. Or sometimes, it just a bad plugin that causes a JavaScript error, which may result in all JavaScript failing ( the nature of JavaScript ). Not really a "conflict" in that case, really an error due to a bad plugin/theme.

Jason Caldwell: I've also see some conflicts between frameworks. That's rare, but there are some plugins that use the ProtoType framework, and combined with another framework like MooTools, there is a possibility for a conflict to arise. Rare though, and it's usually attributed to the way their loaded ( i.e. by a bad plugin/theme ).

Cristián: Does WP load JQuery already? If so, why do plugins load it too?

Jason Caldwell: Yea, WP already loads it. But some plugin authors don't know that, or they just hard code it into their plugin not realizing that. Other times they'll try to include a dependency on jQuery, but they name it wrong, and WordPress gets confused.

Cristián: Does s2Member load it again or uses WP's?

Jason Caldwell: Hmm, not really, because in the Dashboard, it's already loaded by WordPress. s2Member enques scripts that is uses, which rely on jQuery being present. In the call to wp_enqueue_script(), s2Member will list jQuery as a dependency, which forces WP to load it, though it's already loaded in the Dashboard anyway. That's the proper way to handle it.

On the front-end of a site, s2Member will load jQuery if it's not already loaded, but again, using the same technique. A call to wp_enqueue_script() with a dependency on jQuery forces WP to load jQuery. If 10 plugins all do it this way ( i.e. the right way ), WordPress loads jQuery in the proper order and only one time.

Cristián: Ah, got it. I understand WP has a QC team, don't they check this?

Jason Caldwell: Not in my experience. They look mostly for security issues and really bad code. They usually don't catch minute details like this.

Cristián: I see. Well, they do look at how the db is used, iirc.

Cristián: I see, but these details do cause trouble for the users. Maybe it'd be good to write an article about JS conflicts as you explained above and post it in the forums, and then show it to the QC guys for consideration to include in their quality checklist.

Jason Caldwell: Yea, that's a good idea. On the WP side though, they're aware of this problem, and that's why they created the wp_enqueue_script() wp_enqueue_style() functions. Although, I wish this were more prominent in this article: http://codex.wordpress.org/Writing_a_Pl ... uggestions

It is mentioned, but it's all the way at the bottom:

Try not to echo <script> and <style> tags directly - instead use the recommended wp_enqueue_style() and wp_enqueue_script() functions. They help eliminate including duplicate scripts and styles as well as introduce dependency support. See posts by the following people for more info: Ozh Richard, Artem Russakovskii, and Vladimir Prelovac.


I hope it helps!
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


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron