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!

Comments

  • Hi,

    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.
  • Update. We are using PHP 5.6, memory at 256m, max_input_vars 10000, max_execution_time 180. Everything green on Server info panel. The theme options line in the wp_options table is replaced with correct defaults as if someone has hit the reset button, but we can see with tests/logs the site is secure and this happens even with no-one logged in or even visiting the site. The infrastructure is Litespeed V6.9, not Apache, might that be relevant? We disabled Litespeed caching last night and that seems to have stopped the problem for now; but can't be sure as this is an intermittent error :/  I cannot understand how caching could cause a tehme option reset, however.
  • We see this issue has been touched on before:

    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.
  • Workaround Options:

    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.
  • edited September 2016
    Option one won't work easily.
    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.
  • We are sorry but we do not have any solution to disable functions/options responsible for reset to default. This requires files customization so if you want to disable it, you need to contact with your web developer.

    P.S. For Reset to Default button is responsible function _default_values() function located under muffin-options/options.php file.
Sign In or Register to comment.