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™

This Is Weird!!

s2Member Plugin. A Membership plugin for WordPress®.

Re: This Is Weird!!

Postby Eduan » November 8th, 2011, 2:45 pm

What version of WordPress and s2Member are you using peterhuk?
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: This Is Weird!!

Postby Jason Caldwell » November 8th, 2011, 6:27 pm

Thanks for the heads up on this thread.
~ Investigating now.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: This Is Weird!!

Postby Jason Caldwell » November 8th, 2011, 6:51 pm

Interesting. Well, I'm so sorry. I've been unable to reproduce this so far. I've tested against WordPress v3.2.1 and WordPress v3.3-beta2 running s2Member Pro v111105.

Here are some things that we can look at perhaps.

1. Are you running any caching plugins that attempt to perform object caching?
If you're running W3 Total Cache, try testing without this enabled, or with object caching disabled.

2. Are you running any custom code of your own? An s2member s2-hacks.php file? Anything that updates details about a User either before or after checkout/modification?

It sounds like there is either stale information being saved somewhere, or that stale information is sitting in an object cache and is not being updated properly. Short of that, I'm at a loss. If problems persist, please submit a Dashboard login and any access details that I need to reproduce this on your installation. Please use this private contact form for that: http://www.s2member.com/contact/
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: This Is Weird!!

Postby peterhuk » November 8th, 2011, 6:59 pm

Hi Eduan , Jason.

Eduan I am running WordPress 3.2.1 and at present
S2 Member Version 111029 + s2Member Pro v111029


Jason,

I think I have found the problem. Why it has only took till now to show up I dont
know but the bug I found was in:

/wp-content/plugins/s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php


On Line 120 I found:

Code: Select all
if ($paypal["ccaps"] && preg_match ("/^-all/", str_replace ("+", "", $paypal["ccaps"])))
foreach ($user->allcaps as $cap => $cap_enabled)
  if (preg_match ("/^access_s2member_ccap_/", $cap))
    $user->remove_cap ($ccap = $cap);


I could not understand the preg_match command:
preg_match ("/^-all/"


I search the net hi and low for a precedence for its use and found none. This command
(what ever it was suppose to do) was stopping the deletion of the ccaps. Which meant that
members wishing to down grade would pay less for the capabilities that had previously.

I removed the entire match:
&& preg_match ("/^-all/", str_replace ("+", "", $paypal["ccaps"]))


from the if staement and test completed Successfully!!.

Please verify and update all simular files with this bug.

Many thanks

PeterHuk
Last edited by peterhuk on November 8th, 2011, 7:07 pm, edited 1 time in total.
User avatar
peterhuk
Experienced User
Experienced User
 
Posts: 102
Joined: February 12, 2011

Re: This Is Weird!!

Postby Eduan » November 8th, 2011, 7:04 pm

Glad you could identify the problem. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: This Is Weird!!

Postby Jason Caldwell » November 8th, 2011, 7:12 pm

Hi Peter. Thanks for the follow-up.

OK. So I've misunderstood the issue you reported. The issue was with existing Custom Capabilities not being removed, and reset to ONLY the new ones that you listed in the modification form.

This is to be expected in the latest releases of s2Member.
Please check this section of your Dashboard. The call to preg_replace() with the -all specification is not a bug, that's the intended behavior in the latest releases of s2Member.

s2Member -> PayPal Pro Forms ( click image to enlarge )
This is from the [?] icon next to the Custom Capabilities field.
SNAG-0117.png

So you'd want this in your s2Member Pro Form Shortcode:
Code: Select all
ccaps="-all,cmem,csfb,spof,tsas,mmed"

100% Resolved
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: This Is Weird!!

Postby peterhuk » November 8th, 2011, 7:24 pm

Many thanks Jason,

This is a nice feature but a potentially dangerous one for S2Member web owners
who probably didn’t realise its ramifications.

For new features like this is there anyway to highlight there use or make them
more obvious. As there must be many S2Member web owner using existing
templates who will be unaware of the impact of this new feature.

Many thanks

PeterHuk
User avatar
peterhuk
Experienced User
Experienced User
 
Posts: 102
Joined: February 12, 2011

Re: This Is Weird!!

Postby Jason Caldwell » November 8th, 2011, 7:31 pm

Thanks for the follow-up.

Yes, I'm sorry. We normally make every effort to provide backward compatibility when/if something like this changes. However, this particular case was an exception. We'll make an effort to spotlight things like this in future releases, should something cease to be supported.

This was changed in the release of s2Member v110815.

Changelog excerpt:
http://www.primothemes.com/readme/3679/
(s2Member/s2Member Pro) Capability Additions (Changed). In previous versions of s2Member, when generating a Payment Button/Form, it was possible to precede your list of Custom Capabilities with a + sign, indicating that you wish to (Add) new Custom Capabilities instead of (Resetting) a User's Capbilities to the ones you list. Starting with this release, (Add) is now the default behavior. In other words, the + sign is no longer required, because s2Member will automatically (Add) Capabilities to any that already exist for a particular User/Member, even without the + sign (no longer required). In addition, there is now a new directive available: -all. You may now precede your list of Custom Capabilities with -all, but only if you wish to (Remove/Reset) all Custom Capabilities, and then (Add) new ones. For example: -all,music,videos, would remove any existing Custom Capabilities that may or may not already exist for a particular User/Member, and then add: music,videos. There are additional examples provided by the Payment Button/Form Generators that come with s2Member. Please check your Dashboard if you'd like to learn more.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: This Is Weird!!

Postby peterhuk » November 8th, 2011, 7:50 pm

Many thank Jason,

I randomly selected version 110815 thinking that would be far back enought to
test for this issue (but it was not far back enought LOL).

After any update I normally run a series of tests on my test site to
look for potential problems. This has highlighted a major flaw in
my testing procedures :oops: .

Will have to implement more robust testing.

Many thanks for your assistance.

PeterHuk
User avatar
peterhuk
Experienced User
Experienced User
 
Posts: 102
Joined: February 12, 2011

Re: This Is Weird!!

Postby Cristián Lávaque » November 11th, 2011, 12:46 am

Got it. Thanks for reporting this, guys. I hope Jason gets to this soon. :)
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: This Is Weird!!

Postby Jason Caldwell » November 15th, 2011, 4:11 pm

Cristián Lávaque wrote:Got it. Thanks for reporting this, guys. I hope Jason gets to this soon. :)
This was related to a misunderstanding about the functionality in the latest releases. Or, more accurately, the inability for s2Member to maintain backward compatibility for the behavior that existed in previous releases, in this regard. Please see this post for a resolution:
viewtopic.php?f=4&t=15812&p=52590#p52590
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: This Is Weird!!

Postby beyonddesign » November 28th, 2011, 6:09 pm

I am having the exact same problem and I wish someone would help out as I did pay for a developer license. Like the user above, when and existing member tries to update their custom capabilities, s2member won't update them. They ARE being passed to Paypal correctly as my IPN logs indicate. They just aren't being updated on the WordPress side. This is really killing me as I have to try to hunt down every purchase every day to manually update their accounts! Would someone please be willing to reach out and help with my specific site? I know I've already paid for the developer version, but I would love to pay more for someone to check out my site instead of guessing what it might be on the forums here!
User avatar
beyonddesign
Registered User
Registered User
 
Posts: 14
Joined: May 8, 2010

Previous

Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 4 guests

cron