latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

s2Member on WordPress Network (Multisite)

Home Forums Community Forum s2Member on WordPress Network (Multisite)

This topic contains 13 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 4 months ago.

Topic Author Topic
Posted: Sunday Aug 26th, 2012 at 4:23 pm #23124

I run a WP network for my own blogs with a domain setup (each blog has a different domain name). I installed s2Member in the main blog (as it is the only way possible within thius WP configuration) and then activated the plugin on one of my child blogs (I only want to use s2Member on one blog for the moment).

The problem is with the registration page. The link is properly configured on the s2M setup pages (i.e. the link contains the domain of my child blog), but when I click it it will redirect me to the registration page of the main (network) blog, even if I’ve configured all customizations for the registration page on s2M. Worst thing is that since this main blog is the network one, the options for registration correspond to those for the creation of a new blog, which is in no way the case, I just want my subscribers to have access to private content on my child blog.

Is there a way for the resgitration page to remain under the domain of my child blog (the one s2M is activated on)? I don’t want my subscribers to see anything from my main (network administrator) blog as this would be very confusing for them (domain changes, logo changes, theme changes… it’s just not the same blog).

List Of Topic Replies

Viewing 13 replies - 1 through 13 (of 13 total)
Author Replies
Author Replies
Posted: Tuesday Aug 28th, 2012 at 6:54 am #23251

Hi Mary.

Hmm… that reminds me of a similar problem reported before, but it was a problem in WP itself. Let me see if I find it…

http://www.s2member.com/forums/topic/login-widget-on-multisite/#post-19982

Not exactly the registration link you mentioned, but closely related, so it’d be worth looking for this same problem. Basically it’s using [hilite mono]network_site_url[/hilite] instead of [hilite mono]site_url[/hilite].

I hope it helps. :)

Posted: Tuesday Aug 28th, 2012 at 7:52 am #23264

Hey Cristián, thanks for your reply!

I checked my general-template.php file and the lostpassword function was ok (it contained network_site_url) as in the other topic. I tested it and it works (it doesn’t redirect me to the main network site).

The register function contained only site_url. I added the network bit to it (turned into network_site_url) but it’s still not working (it keeps redirecting me to the main network site register page). I compared both functions to see if I could make them match someplace else, but they’re quite different.

Here’s how my register function looks like:

function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {

	if ( ! is_user_logged_in() ) {
		if ( get_option('users_can_register') )
			$link = $before . '<a href="' . network_site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after;
		else
			$link = '';
	} else {
		$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
	}

	if ( $echo )
		echo apply_filters('register', $link);
	else
		return apply_filters('register', $link);
}

And this is my child blog registration link:

http://www.tunuevocuerpo.com/wp-login.php?action=register

I also did a search on the WP forums but the few posts I could find were not exactly about the same thing. Only this one reported the same issue:

http://wordpress.org/support/topic/loginactionregister-says-registration-has-been-disabled

And this user actually posted on the old s2Members forum:

http://www.primothemes.com/forums/viewtopic.php?f=4&t=15431

In his case it was apparently a plugin-compatibility problem, but I didn’t quite get to understand if/how he solved his issue, so I’m gonna need an extra help with this :(

  • This reply was modified 4 years, 4 months ago by  Mary Grisolia.
Posted: Tuesday Aug 28th, 2012 at 8:06 am #23269

Hello Mary,

You need to leave your register function how it was, without:

network_

I checked my general-template.php file and the lostpassword function was ok (it contained network_site_url)

You need to remove

network_

from those.

For s2Member to work properly on MU you also need to apply a patch which is found:

WordPress Dashboard => s2Member® => Multisite ( Config ) => Multisite WordPress® Patches

Select yes and save the changes.

Or have you already applied the patch?

Posted: Tuesday Aug 28th, 2012 at 8:25 am #23277

Thanks Philly, changed back!

About the patch, no, I haven’t applied any patchs yet, but I can’t seem to find the path you’re pointing me to.

On my child blog’s dashboard, there is no s2Member® => Multisite ( Config ) option (check my screenshot here: https://www.dropbox.com/s/hez9cytd0rwsspb/WPDashboard-s2member.jpg)

There is no s2Member option on my main network blog dashboard.

P.S.: Why do I need to remove “network_” from the wp_lostpassword function? It was like that, I didn’t change it, and it works OK… (I’m just curious and don’t want to mess things up)

  • This reply was modified 4 years, 4 months ago by  Mary Grisolia.
Posted: Tuesday Aug 28th, 2012 at 8:39 am #23282

Hmm that is strange.

Try typing this into your browser address bar:

yourmainsite.com/wp-admin/network/admin.php?page=ws-plugin–s2member-mms-ops

Posted: Tuesday Aug 28th, 2012 at 8:43 am #23283

If you leave the network bit there when somebody on one of your child sites clicks the lost password link it will redirect them to your main blog, which would be confusing to the user if the sites are not related.

I gave up using MU for sites that are not related to each other, I just came across to many problems especially when sites grow.

Posted: Tuesday Aug 28th, 2012 at 8:58 am #23285

For the address I get a “you don’t have enough rights to access this page” (or something like that, mine is in Spanish). This happens wether I use the main network blog domain name or the child blog one, and I got that message after logging in (it redirects me to the login page if I’m logged out).

I’m of course the network and site administrator. Actually, I’m the only user on this network. I have never installed any capability manager plugin – just in case you were wondering.

As for the lostpassword, I actually tried it (as is, with the network_ part it had, not having changed anything) for my child blog and it works fine (I don’t get redirected to the main network blog). I hadn’t ever touched this file before, do I really need to remove that bit? because, as I’m telling you, it works fine (contrary to the register function, which does redirect me to the main network site).

P.S.: Yes, MU is actually not easy to work with, but I cannot stand the idea of having to have multiple wordpress installations :(

Posted: Tuesday Aug 28th, 2012 at 9:15 am #23289

I think when you apply the patch the bit that doesn’t work will. And yes if it works don’t change anything :)

Thats strange that you don’t have permission to configure s2 for multisite, sorry I’m not sure why then lets see what Cristián thinks

Posted: Wednesday Aug 29th, 2012 at 7:54 am #23384

Hmm… Yeah, I don’t know either why you wouldn’t be able to see the multisite options page for s2Member if you’re logged in as the network’s admin. :/

Could you make double sure that you’re actually logged in to that account and navigate to that page again?

Posted: Wednesday Aug 29th, 2012 at 8:52 am #23397

Philly, thanks anyway for your help :)

Cristián, I double checked an I still get the same message. I took a few screenshots.

Here you can see that I’m logged in and I’m the network admin (super admin):
https://www.dropbox.com/s/24aiscv29oiu2dt/network-super-admin.jpg

Notice there’s no s2Member menu in the left.

Here, I get the error message when I navigate to the s2M network options page:
https://www.dropbox.com/s/b1yq8437cqrfqtd/not-enough-rights.jpg

And here is the configuration of my Domain Mapping plugin (needed in order to have each child blog have their own domain name):
https://www.dropbox.com/s/8j85ef114nfmlbf/domain-mapping.jpg

Maybe the problem is right there? Or is there something that I’m missing or doing wrong?

Posted: Wednesday Aug 29th, 2012 at 9:16 am #23400

Hi Mary,

I think I’ve worked it out…

If you only have s2 installed on a blog other than the main one in a network, s2member does not allow you to configure MU.

If you ‘network enable’ s2member under /wp-admin/network/plugins.php, the config option will be visible, this of course activates s2member on all blogs, so you will have to de-network-activate after you apply the patch.

Now I’m not sure if this is a bug? I’m also not sure if s2 will auto patch after a wordpress update?

Also what the patch actually does is reinstate the default wordpress login/register system as opposed to the MU one.

Posted: Wednesday Aug 29th, 2012 at 10:05 am #23405

Philly, you got it!

I didn’t have to network activate the plugin but only to activate it on the main blog. The options became immediatly available on the network dashboard (I even got an alert as soon as I activated the plugin on the main blog).

It’s all set now and the registration link is working (yey!).

I don’t mind having the plugin activated on the main blog (even if I won’t use it there), so I’ll just leave it like that.

About you’re question, this message appears right below the s2M network options panel:

These files MUST be patched, each time you upgrade the WordPress® core. If you set this option to Yes ( Patch Automatically ), s2Member will patch your installation now, and also in the future, should you upgrade to newer version. That way, you won’t need to patch manually each time WordPress® is upgraded.

Thanks again!!

P.S.: Cristián, thanks for having taken a look at this too. I posted another question in the forum a few days ago, hope that you get the time to see that one (still unsolved). It’s about payment/membership options.

Posted: Thursday Aug 30th, 2012 at 7:23 am #23552

No problem, Mary. Good think Philly figured out what your problem was with it. :)

About the other thread, you mean this one? http://www.s2member.com/forums/topic/how-to-set-up-trial-3-months-lifetime/ I already replied to it, but you maybe you didn’t get a notification.

Viewing 13 replies - 1 through 13 (of 13 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.