Theme Options getting reset to defaults without any action
We have had Betheme installed on our hosts for over a year. We love it!
However, in the last 24 hours we have a large problem. All the the theme options are being set to default at random. This will happen even if no-one is in admin or even logged in. We have diffed the database before and after and the only difference is line 133 in the the wp_options table where all our setttings are lost and line 3699:
+"3699","_transient_timeout_mfn-opts-saved","1474669330","no"
-"3699","_transient_timeout_mfn-opts-saved","1474661125","no"
What does this look like to you? Please help!
However, in the last 24 hours we have a large problem. All the the theme options are being set to default at random. This will happen even if no-one is in admin or even logged in. We have diffed the database before and after and the only difference is line 133 in the the wp_options table where all our setttings are lost and line 3699:
+"3699","_transient_timeout_mfn-opts-saved","1474669330","no"
-"3699","_transient_timeout_mfn-opts-saved","1474661125","no"
What does this look like to you? Please help!
Comments
to be honest, we don't know what might be the reason because we did never met with anything like that. Don't you see anything in server logs? If you don't, please make sure you are using PHP version minimum 5.6 and memory limit is enough. You can check both under Appearance > System Status section.
http://forum.muffingroup.com/betheme/discussion/15892/our-theme-options-keep-automatically-resetting-to-default
http://forum.muffingroup.com/betheme/discussion/14604/bethemes-reset-to-default-settings-automatically
It would be very useful to know how these cases were resolved. Our site hasnt defaulted in 20 hours now so hopefully it is realted to Litespeed cache, though knowing the exact cause would be very useful to fix this permanently and properly.
1. Are the default settings stored in a file or database entry somewhere? I do not want to set default settings, I wish to change the defaults settings to my settings as a workaround so that when the settings are defaulted by this bug, no changes are effectively made.
2. A second possible workaround - where is the reset to default theme options function and how would I disable it? It seems it is being triggered somehow.
I see many default settings are in a huge array in muffin-options/theme-options.php like:
942 'title' => __('Style', 'mfn-opts'),
943 'options' => mfna_header_style(),
944: 'std' => 'modern',
Where line 944 for example sets the modern header as default. Other options seem to be hardcoded fallbacks like the logo.
So trying option 2 now.
How do we stop defaults function from operating? I've tried commenting out the contents of the following functions found in muffin-options/options.php but I can still set theme options to defaults manually.
function _default_values()
function _set_default_options()
Can you tell us how to completely disable all functions that will default the theme? Thanks!
It'd be very useful if the disabling code was in a format we could put in the child functions.php. I'm thinking it must need to be something like this:
function child_remove_parent_function() { remove_action( 'admin_init', 'parent_function' ); } add_action( 'wp_loaded', 'child_remove_parent_function' );
But we'll need to know all the functions to disable.
P.S. For Reset to Default button is responsible function _default_values() function located under muffin-options/options.php file.