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™

Upgrade to WordPress 3.1

s2Member Plugin. A Membership plugin for WordPress®.

Upgrade to WordPress 3.1

Postby AdmiralsReserve » February 23rd, 2011, 3:27 pm

Is anyone else encountering problems with the plug-in after upgrading to V3.1?
User avatar
AdmiralsReserve
Registered User
Registered User
 
Posts: 6
Joined: February 23, 2011

Re: Upgrade to WordPress 3.1

Postby dwdutch » February 23rd, 2011, 8:45 pm

Yep... just upgraded. Now with WP 3.1 and S2M 3.3.2. go to Users page and I see an error message:

Warning: Invalid argument supplied for foreach() in [URL-ROOT]/wp-content/plugins/s2member/includes/functions/users-list.inc.php on line 90

Checking out the file, line 90 reads:

Code: Select all
foreach ($user->allcaps as $cap => $cap_enabled)



I haven't fully explored this impact on custom capabilities. I'll continue looking for other issues first.

What have you seen?
User avatar
dwdutch
Registered User
Registered User
 
Posts: 24
Joined: January 16, 2011

Re: Upgrade to WordPress 3.1

Postby AdmiralsReserve » February 24th, 2011, 1:14 am

Got exactly the same - plus I have also lost the date and time when some of the users registered for the site
User avatar
AdmiralsReserve
Registered User
Registered User
 
Posts: 6
Joined: February 23, 2011

Re: Upgrade to WordPress 3.1

Postby urbanryno » February 24th, 2011, 3:13 am

oh, crap. that would be bad (the registered date)
User avatar
urbanryno
Registered User
Registered User
 
Posts: 11
Joined: February 8, 2011

Re: Upgrade to WordPress 3.1

Postby AdmiralsReserve » February 24th, 2011, 4:02 am

Am getting that issue right across the board for members that have paid a subscription and also those that are using areas of the site for free
User avatar
AdmiralsReserve
Registered User
Registered User
 
Posts: 6
Joined: February 23, 2011

Re: Upgrade to WordPress 3.1

Postby urbanryno » February 24th, 2011, 5:08 pm

yup. and total silence from support even when you email them at their support email address. total silence even though they say

"We're committed to our customers and have a passion for technology. We hold ourselves accountable to our customers, partners, and employees; by honoring our commitments, providing results, and striving for the highest quality. Our work is based on the belief that products and services are only as strong as the support team standing behind them."


starting to not look like they mean what they advertise. :cry:
User avatar
urbanryno
Registered User
Registered User
 
Posts: 11
Joined: February 8, 2011

Re: Upgrade to WordPress 3.1

Postby johnnysilvers » February 25th, 2011, 10:26 am

I have experienced the same issue and there are now several threads here all detailing the same thing.

Being new to this forum, is there a reliable single source place to get news of updates or bugs like this?

Thanks!
User avatar
johnnysilvers
Registered User
Registered User
 
Posts: 5
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby JamesUT » February 25th, 2011, 12:59 pm

Hi,

I'm not sure how deep the issue goes, but for the warnings on the users listing I did the following:

In wp-content/plugins/s2member/includes/functions/users-list.inc.php around line 90 find:
Code: Select all
foreach ($user->allcaps as $cap => $cap_enabled)
if (preg_match ("/^access_s2member_ccap_/", $cap))
$ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
/**/
$val = (!empty ($ccaps)) ? implode ("<br />", $ccaps) : "—";

add the if condition above it and closing bracket below as shown:
Code: Select all
if (is_array($user->allcaps)) {
foreach ($user->allcaps as $cap => $cap_enabled)
if (preg_match ("/^access_s2member_ccap_/", $cap))
$ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
/**/
$val = (!empty ($ccaps)) ? implode ("<br />", $ccaps) : "—";
}

This just has it check if it's an array or not and execute accordingly. It got rid of the warnings on my installs.

Hope this helps.
User avatar
JamesUT
Registered User
Registered User
 
Posts: 1
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby Cristián Lávaque » February 25th, 2011, 1:41 pm

So before WP 3.1 $user->allcaps would always output an array and now it sometimes doesn't? Just trying to understand what the issue is.

If $user->allcaps is used elsewhere, then a similar problem may come up. Would be good to go where $user->allcaps is and make sure it always outputs an array.
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: Upgrade to WordPress 3.1

Postby itsalaska » February 25th, 2011, 2:31 pm

This is my solution:
Code: Select all
if(!$user->allcaps) $user->allcaps = array();

Place it at line 90 before the foreach. solves the issue.
User avatar
itsalaska
Registered User
Registered User
 
Posts: 5
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby J_J_R » February 25th, 2011, 5:40 pm

@itsalaska and @JamesUT

Sorry folks, but this can't be the answer. It breaks the Pretty Links plugin and god knows what all else. This is really frustrating me because I have a membership site due to launch on Tuesday and I've been torpedoed.
User avatar
J_J_R
Registered User
Registered User
 
Posts: 4
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby Cristián Lávaque » February 25th, 2011, 5:48 pm

J_J_R wrote:This is really frustrating me because I have a membership site due to launch on Tuesday and I've been torpedoed.


I can understand that.
Last edited by Cristián Lávaque on February 26th, 2011, 4:54 pm, edited 1 time in total.
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: Upgrade to WordPress 3.1

Postby J_J_R » February 25th, 2011, 8:14 pm

Maybe the approach is wrong..does anybody know how to revert to WP 3.05?
User avatar
J_J_R
Registered User
Registered User
 
Posts: 4
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby lalitkishore » February 26th, 2011, 1:11 am

Yes you can downgrade to 3.05. Just follow the procedure for manual upgrade and replace files from 3.1 with 3.05. Make sure that you follow the instructions and do not replace the following files and folders:
wp-config.php file;
wp-content folder;
wp-images folder;
wp-includes/languages/ folder--if you are using a language file, do not delete this folder;
.htaccess file--if you have added custom rules to your .htaccess, do not delete it;
Custom Content and/or Plugins--if you have any images or other custom content or Plugins inside the wp-content folder, DO NOT delete them.

One of the links to do that is given here
http://www.siteground.com/tutorials/wor ... pgrade.htm
User avatar
lalitkishore
Registered User
Registered User
 
Posts: 2
Joined: February 16, 2011

Re: Upgrade to WordPress 3.1

Postby J_J_R » February 26th, 2011, 8:21 am

Gotta say this makes me more than a little nervous.

My hosting company was able to roll me back to 3.05 and I was pretty excited about it until I realized that all the databases had been rolled back too (losing 2.5 days of work).

So, the next concept was to use the latest databases and hook them into the old WordPress. (It didn't work for some reason. Remember that. :? ).

Next, I asked them to put me back just how it was before I called (WP 3.1) and give me a few minutes to manually copy off the pages I needed. The plan being to manually install them into WP 3.05 later.

Good plan, right? makes sense in a desperate sort of way. So, what happened?

Apparently, in the 20 minutes it took me to make my copies, their servers updated for the week and blew away the WP 3.05 data! No way to recover WP 3.05 now. Who's really buying that story?

Anyway, that was a rather long winded way of saying that I'm not sure my latest database versions will operate with the old WP 3.05, even if I did manage to manually re-install it.
User avatar
J_J_R
Registered User
Registered User
 
Posts: 4
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby Elizabeth » February 26th, 2011, 9:13 am

s2Member has been upgraded to address this issue.
http://www.primothemes.com/readme/3679/#rm-changelog
1.5

* (s2Member/s2Member Pro). WordPress® 3.1. Updated for full compatibility with WordPress® 3.1 ( s2Member also remains compatible with the WordPress® 3.0.x series ).

Please upgrade to the latest version.
User avatar
Elizabeth
Moderator
Moderator
 
Posts: 160
Joined: May 12, 2010

Re: Upgrade to WordPress 3.1

Postby camillemm » February 26th, 2011, 11:25 am

At last a good news ! Hope it helps everybody (I was praying the silence was due to hard work on a WP 3.1 compatible version).
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: Upgrade to WordPress 3.1

Postby J_J_R » February 26th, 2011, 3:04 pm

At last a good news ! Hope it helps everybody (I was praying the silence was due to hard work on a WP 3.1 compatible version).


My thoughts EXACTLY.
User avatar
J_J_R
Registered User
Registered User
 
Posts: 4
Joined: February 25, 2011

Re: Upgrade to WordPress 3.1

Postby itsalaska » February 26th, 2011, 4:43 pm

J_J_R wrote:@itsalaska and @JamesUT

Sorry folks, but this can't be the answer. It breaks the Pretty Links plugin and god knows what all else. This is really frustrating me because I have a membership site due to launch on Tuesday and I've been torpedoed.


As a 10 year php developer, trust me i know my stuff, and i see no reason why making an empty variable become an empty array would screw anything up, not to mention that it is contained within a class so it can't possibly affect another plugin.
User avatar
itsalaska
Registered User
Registered User
 
Posts: 5
Joined: February 25, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron