Fatal error: Call to undefined method stdClass::save()
-
Hi
I have wordpress network and installed buddypress on the network. my network just has a subdomain. everything was working well but when I was changing some settings in another plugin, I suddenly noticed that my subdomain doesn’t open… so I enabled PHP errors and now I get this error:Warning: Creating default object from empty value in /domains/mysite.com/public_html/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php on line 258 Fatal error: Call to undefined method stdClass::save() in /domains/mysite.com/public_html/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php on line 275
-
Thanks for the bug report, @wvmohzoibar.
Before I file a ticket about this, can you tell us how you triggered this bug?
We do some checks to ensure that the profile group ID is not blank before proceeding, so it would be nice to find out how you are encountering this error:
https://buddypress.trac.wordpress.org/browser/tags/2.4.0/src/bp-xprofile/bp-xprofile-functions.php?marks=241-244,258#L224I was changing some settings in another plugin
What plugin were you using that caused this bug?
actually I installed two plugins:
wp super cache
symple shortcodes by AJ clarkebut after changing and saving the settings, I checked the subdomain and there were no problem.. and then I don’t remember what actually I did that I encountered this error… the strange part is that my main site doesn’t have any problem but the subdomain shows this error
I encountered the same problem (Fatal error: Call to undefined method stdClass::save() in …/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php on line 275). I am running Buddy Press in a multisite. It was working fine until I updated the plugin today.
Hello,
I have the same problem installing the WOFFICE-theme (http://themeforest.net/item/woffice-intranetextranet-wordpress-theme/11671924).
Warning: Creating default object from empty value in C:\xampp\htdocs\home\wp-content\plugins\buddypress\bp-xprofile\bp-xprofile-functions.php on line 258
Fatal error: Call to undefined method stdClass::save() in C:\xampp\htdocs\home\wp-content\plugins\buddypress\bp-xprofile\bp-xprofile-functions.php on line 275Sweeny
Of course, nothing special. I have installed the woffice theme and activated woffice birtday plugin. After this… The error appeared.
@sweeny – WOFFICE is a premium theme that we do not have access to.
The other replies in the thread mention that they are using multisite. Are you using multisite?
Hi @Sweeny,
Woffice developer team here !
Do you have any ticket open here : https://2f.ticksy.com/ ? Please send us some access to your website so our team can figure out what’s going on ๐
The issues is also present with some other themes but it seems to be caused by the Birthday extension. As we create new Xprofile fields, but if was working fine before 2.4.0 and we can’t reproduce it.
That’s why we need more details ๐
Thanks @r-a-y btw !
Cheers
2F
@doublef – It’s probably a problem with the way your team has coded the Birthday plugin.
Can you post the relevant lines where you are creating the profile fields?
@doublef
Sorry, can’t give access. It’s a local test environment with a WAMPP installation (apachefriends.org). Perhaps it’s a interaction between this environment and Woffice?
Php 5.6.14, Apache 2.4.4
@r-a-y
I didn’t install a multisite.The other guys here used different plugins; so it cannot be only a Woffice problem.
Sweeny
Hi @r-a-y,
Here is the function :
function woffice_birthdays_add_field() { if ( bp_is_active( 'xprofile' ) ){ global $bp; global $wpdb; // We check for multisite : if (is_multisite() && is_main_site()) { $table_name = $wpdb->base_prefix .'bp_xprofile_fields'; } else { $table_name = $wpdb->prefix .'bp_xprofile_fields'; } $sqlStr = "SELECT <code>id</code> FROM $table_name WHERE <code>name</code> = 'Birthday'"; $field = $wpdb->get_results($sqlStr); if(count($field) > 0) { return; } xprofile_insert_field( array ( 'field_group_id' => 1, 'field_id' => 'woffice_birthday', 'can_delete' => true, 'type' => 'datebox', 'description' => __('We will only use it for the Birthday widget, so we can celebrate everyone\s birthday.','woffice'), 'name' => 'Birthday', 'field_order' => 1, 'is_required' => false, ) ); } } add_action('bp_init', 'woffice_birthdays_add_field');
I’m able to reproduce it so I’ll try to troubleshoot it now ๐ I keep you updated,
2F
Hi there,
Okay the issue is that the field_id parameter has to be an INT and not a string. Otherwise the save() won’t work out…500 error.
Regarding Woffice buyers, you can turn off the extension for now, the fix will be available in the next 30 minutes ๐
Thank you @r-a-y !
Glad that you found out the problem, @doubleF!
How can we disable birthday extension when we don’t have access to dashboard?
How can we disable birthday extension when we donโt have access to dashboard?
Rename the theme/plugin you are using.
For the theme, change eg.
/wp-content/themes/woffice/
to/wp-content/themes/woffice2/
and reload the frontpage. This should fallback to Twenty Sixteen.Then, rename the folder back to the original name.
If that doesn’t fix the problem, rename the entire
/wp-content/plugins/
directory to/wp-content/plugins2/
and reload the frontpage. This will disable all your active plugins, which should allow you to access the dashboard.Then, rename the plugins directory back to normal and go to the Plugins admin page to reactivate the plugins manually.
Hello guys.. I didnยดt get it. If I am correct.. we just identified the bug but its fix arenยดt available yet. Is it correct?
If not.. please could you give me details how to fix.. I mean.. I got the explanation to disable the plugin.. Do I need to do some thing more to fix and use the woffice theme?
Hi @cassionunes,
It’s fixed, and the updated version is available here (https://woffice.io/updater/) or on Themeforest since yesterday ๐
Feel free to open a ticket if you need more details.
@wvmohzoibar : I’ve replied on your ticketBest regards
2F
Hi @doublef
I have been experiencing this issue as well. Just noticed today. I have updated to 1.5.1 but the issue still exists for me. I am still unable to access the subsite in which woffice lives.
Can you give us a hand?
Another note I would make: wpoffice is on a subsite and yesterday we went from development site to live environment which came with URL changes via search arn replace for all possible parameters. Not sure if that helps or not, but felt it may play a role.
Kindest,
ShaneHere is the latest error log:
PHP message: WordPress database error Table ‘mysitename.wp_16_bp_xprofile_groups’ doesn’t exist for query SELECT DISTINCT g.id FROM wp_16_bp_xprofile_groups g WHERE g.id = 0 ORDER BY g.group_order ASC made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, bp_init, do_action(‘bp_init’), call_user_func_array, woffice_social_fields, xprofile_insert_field_group, BP_XProfile_Group->__construct, BP_XProfile_Group->populate, BP_XProfile_Group::get
PHP message: WordPress database error Table ‘mysitename.wp_16_bp_xprofile_groups’ doesn’t exist for query INSERT INTO wp_16_bp_xprofile_groups (name, description, can_delete) VALUES (‘Social’, ”, 1) made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, bp_init, do_action(‘bp_init’), call_user_func_array, woffice_social_fields, xprofile_insert_field_group, BP_XProfile_Group->save
PHP message: WordPress database error Table ‘mysitename.wp_16_bp_xprofile_groups’ doesn’t exist for query SELECT * FROM wp_16_bp_xprofile_groups WHERE name = ‘CoverOptions’; made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, bp_init, do_action(‘bp_init’), call_user_func_array, woffice_cover_add_field
PHP message: WordPress database error Table ‘mysitenameAlso we had not activated the birthday plugin from Unyson.
SIDE NOTE: please think about moving away from UNYSON. It causes so many headaches for multisite. Themefuse is great and I actually purchased there first ever theme, and many more thereafter but it is no good for Woffice. I use nothing pertaining to Unyson with the Woffice theme EXCEPT projects…and thats only because we have to or else it does not load the AWESOME projects integration we are using. ๐ (using the post type ‘project’ is a bad idea as it conflicts with similar project management plugins) Please discontinue Unyson! VC will suffice. Just my 2 cents that I have been wanting to comment on yet haven’t. Keep up the great work..regardless!
Kindest,
ShaneHi Shane,
Please can you open a ticket here : http://2f.ticksy.com/
Let me know the ticket’s ID by email at contact[at]alka-web.com so I can assign the ticket to myself. I’ll be there to help tonight ! ๐
Keep me updated,
2F
- The topic ‘Fatal error: Call to undefined method stdClass::save()’ is closed to new replies.