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™

Just one problem

s2Member Plugin. A Membership plugin for WordPress®.

Just one problem

Postby mrbigstock » January 12th, 2011, 12:50 pm

Hi.

I have managed to get s2member working on my site but one page (internal profile page) shows an error like this:

Fatal error: Call to undefined method stdClass::has_cap() in /home/content ********etc.

there would normally be an 'update profile' button where this code appears

Any ideas or help would be appreciated.

Thanks

John
User avatar
mrbigstock
Registered User
Registered User
 
Posts: 2
Joined: January 12, 2011

Re: Just one problem

Postby idreia » January 12th, 2011, 6:52 pm

First thing to rule out is another plugin that is interfering. You should turn off all plugins except for s2 and see if the error goes away. Then turn your plugins on one at a time and retest until the error reappears--this will be the plugin that is causing the trouble. Once the offending plugin is found you can either look for an upgrade, contact the author, or find a replacement.

It never hurts to let the folks at s2 know about the incompatibility issue, as they are easily fixed once in awhile.
User avatar
idreia
Registered User
Registered User
 
Posts: 9
Joined: January 12, 2011

Re: Just one problem

Postby mrbigstock » January 13th, 2011, 5:23 am

Hi Thanks for the reply. None of that worked unfortunately.

The full error code is below if you have any other thoughts.

Fatal error: Call to undefined method stdClass::has_cap() in /home/content/59/6763659/html/wholesale_clearance_uk/wp-content/plugins/s2member/includes/functions/user-access-level.inc.php on line 38
User avatar
mrbigstock
Registered User
Registered User
 
Posts: 2
Joined: January 12, 2011

Re: Just one problem

Postby jamesg » January 23rd, 2011, 3:02 pm

:D
User avatar
jamesg
Registered User
Registered User
 
Posts: 7
Joined: January 23, 2011

Re: Just one problem

Postby mignonkm » February 19th, 2011, 10:04 am

I'm having this same issue, did you happen to find a solution?
User avatar
mignonkm
Registered User
Registered User
 
Posts: 4
Joined: February 14, 2011

Re: Just one problem

Postby sfraser657 » March 18th, 2011, 1:49 pm

Hey,

It can be fixed by modifying the plugin source. Open the file that has the error and go to the line indicated y the error.
change each occurance of the function as follows:
Code: Select all
$user->has_cap ("access_s2member_level0")

Code: Select all
$user->allcaps["access_s2member_level0"]


You'll have to change it 5 times, one for each access level.

Peace,
Steve
User avatar
sfraser657
Registered User
Registered User
 
Posts: 2
Joined: March 18, 2011

Re: Just one problem

Postby Cristián Lávaque » March 18th, 2011, 2:10 pm

Is this problem present in the latest version of the plugin?
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: Just one problem

Postby MarketerMatt » July 13th, 2011, 11:04 am

Cristián Lávaque wrote:Is this problem present in the latest version of the plugin?


I'm getting the same issue as the above where I'm getting this error where the Update Profile button should be.

Code: Select all
Warning: reset() [function.reset]: Passed variable is not an array or object in /***/wp-content/plugins/s2member/includes/classes/user-access.inc.php on line 51

Fatal error: Call to undefined method stdClass::has_cap() in /home/scepter/***/wp-content/plugins/s2member/includes/classes/user-access.inc.php on line 107


The only thing is, I'm using the new version of the plugin that already has the following by default:

Code: Select all
(user->allcaps ("access_s2member_level" . $n))


Help please.
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011

Re: Just one problem

Postby Cristián Lávaque » July 13th, 2011, 6:12 pm

Hi Matt. Could you please re-install s2Member v110710 following these instructions? viewtopic.php?f=36&t=247
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: Just one problem

Postby MarketerMatt » July 14th, 2011, 1:11 pm

Cristián Lávaque wrote:Hi Matt. Could you please re-install s2Member v110710 following these instructions? viewtopic.php?f=36&t=247


Thanks for the response Cristián, but I'm still getting the same errors... My guess is that there is some conflict with the user membership level.

Any other ideas?

Thanks for the help
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011

Re: Just one problem

Postby Cristián Lávaque » July 14th, 2011, 9:24 pm

has_cap is a WordPress function, not s2Member's. Try updating your WordPress to the latest version. If that doesn't remove the error, try re-uploading /wp-includes/capabilities.php via FTP .

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: Just one problem

Postby MarketerMatt » July 25th, 2011, 2:37 pm

Cristián Lávaque wrote:has_cap is a WordPress function, not s2Member's. Try updating your WordPress to the latest version. If that doesn't remove the error, try re-uploading /wp-includes/capabilities.php via FTP .

I hope that helps.


Hey Cristián, I appreciate your help but this still hasn't solved my problem. WP is at the latest version already and I'm still getting the error. The errors that I get from the admin page are concerning the same thing but are from the users-list-in.inc.php page rather than the user-access.inc.php page.

Code: Select all
Warning: Invalid argument supplied for foreach() in C:\wamp\www\mysite\wp-content\plugins\s2member\includes\classes\users-list-in.inc.php on line 145


Code: Select all
Fatal error: Call to undefined method stdClass::has_cap() in C:\wamp\www\mysite\wp-content\plugins\s2member\includes\classes\users-list-in.inc.php on line 163


Like I said, this is where the "Update Profile" button should be on my theme.
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011

Re: Just one problem

Postby Jason Caldwell » July 27th, 2011, 4:42 pm

Thanks for the heads up on this thread Cristián.
~ and thanks for reporting this important issue.

This sounds like a plugin conflict, or possibly a corrupted wp_users table to me. The error you reported is referring to this section of the code for s2Member, which depends upon the core WP_User property allcaps, which apparently is not present on your installation, for at least one Member. Thus, the error is being generated. This would also explain the error you reported in /user-access.inc.php too.

Code: Select all
foreach ($user->allcaps as $cap => $cap_enabled)
    if (preg_match ("/^access_s2member_ccap_/", $cap))
        $ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap); 
* What other plugins are you running in concert with s2Member please?
~ 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: Just one problem

Postby MarketerMatt » July 27th, 2011, 5:04 pm

Thanks for the response,

I think the conflict is actually with my theme rather than with another plugin since I still get the error even when I deactivate all my plugins. I'm using the classipress theme from http://www.appthemes.com/

Let me know if you need any of the files or code to help me get this fixed. Thanks so much for your help!
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011

Re: Just one problem

Postby Cristián Lávaque » July 27th, 2011, 5:23 pm

Got it. Do you get the error when you switch to the TwentyTen theme?
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: Just one problem

Postby Jason Caldwell » July 27th, 2011, 5:36 pm

MarketerMatt wrote:Thanks for the response,

I think the conflict is actually with my theme rather than with another plugin since I still get the error even when I deactivate all my plugins. I'm using the classipress theme from http://www.appthemes.com/

Let me know if you need any of the files or code to help me get this fixed. Thanks so much for your help!
Thanks for the follow-up. Since this is a commercial theme, we don't have access to its source code. I would suggest contacting the developer and refer them to this thread. Maybe they can spot the issue on their end and get this fixed for you. Either that, or if they'd like to send us a copy of their theme for testing, we'll take a look to see if it's something s2Member can work around in some way. They can use this private contact form: 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: Just one problem

Postby MarketerMatt » July 27th, 2011, 5:41 pm

Okay, thanks for the help. I'll do that.
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011

Re: Just one problem

Postby Jason Caldwell » August 7th, 2011, 2:11 pm

Thanks. I just took a quick look. There's nothing jumping right out at me. However, I do see lots of code in this theme that deals with Users, and it also looks like this theme implements a basic Membership platform, so perhaps this is where the conflict originated. Unfortunately, I don't have time right now to dig through the entire theme and pinpoint the exact conflict that you're having, but I would suggest switching to a different theme and also start with a fresh installation of WordPress, just in case a plugin and/or theme conflict you introduced in the past has caused a corruption in your database.
~ 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: Just one problem

Postby MarketerMatt » August 8th, 2011, 7:16 am

I'll start over fresh today since I still haven't heard back from the makers of the theme. I'm not sure that I have the option to use a different theme but I'll let you know how it goes when I get fresh installs of everything done.

Thanks for your help so far.
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011

Re: Just one problem

Postby MarketerMatt » August 12th, 2011, 10:33 am

I've started over with a fresh installation of wordpress, the theme, and s2member and am still getting a conflict. I still have not received any support from the makers of the theme so if you do get a second to take a closer look, I would appreciate it.

Please let me know if there's anything else I can provide you with, and thanks for the help!
User avatar
MarketerMatt
Registered User
Registered User
 
Posts: 12
Joined: May 6, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron