-
Author
-
January 31, 2018 at 05:25 #187340MichaelPParticipant
On average every 1-2 weeks all theme settings are somehow restored to the default settings. I then import all saved settings from the json file and everything is back to normal. Of course, this is not really a solution.
My guess is that this happens when the server is under stress. Maybe Kleo resets everything if the options appear to be unavailable for a certain time? We have a second site with Kleo with an almost identical configuration where this problem never occurs. The only difference is that the second site has comparably little traffic.
Please note that searching for a plugin conflict is not an option because the problem sometimes does not occur for weeks and it never occurs on an identical test system with no production traffic.
Any ideas? Can I disable the function that resets Kleo to its default settings?
January 31, 2018 at 18:45 #187389RaduModeratorHi,
There is no function that reset theme options on certain action, did you have any plugin that optimize database in some way ? if yes try to de-activate it and check if that still happens.
So the settings are stored in database under wp_options table -> kleo_kleo and kleo_kleo_child option names
Not sure what can cause that, i haven’t hear any other users to report this, if you find out the steps exactly how this can be reproduced tell me to can investigate further.
You can ask the hosting support to help you to look for what changes had been made in the logs in the time where you theme settings had changed in the database under wp_options table.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 1, 2018 at 03:55 #187436MichaelPParticipantRadu, thanks for the quick response.
We don’t use a database optimization plugin and deactivating and reactivating the kleo child theme works without problems. That is, the settings stay.
I checked the wp_options table now and it seems the reset was caused by the kleo_kleo-child-transients entry. When is this option_name used?
I suppose you load the default settings when the theme / child theme is activated the first time? My guess is that the corresponding function is somehow executed by mistake. Where is this function? Can I disable it?
February 1, 2018 at 16:41 #187499RaduModeratorHi,
Just i’ve spoken with the core developer about this issue and if it’s possible to the kleo_kleo-child-transients to reset that, and that is not posible, we have 2 actions that makes the theme options stored in database in wp_options table 1. It’s the save options button and second it’s the customizer!
The theme options kleo child/kleo parent are separated, so if you make a certain setting in child this will not be added in parent, you should export from child and import to parent.
Just give a try to another hosting provider add a stating install there for some time to see that not happens..
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 2, 2018 at 03:21 #187535MichaelPParticipantThere is no hosting provider because we manage the server ourselves.
Note that the problem could also be caused by the Redux Framework that Kleo is using, or perhaps by the changes you made to Redux.
Can you please tell me which function is used to load the default settings when the theme is activated for the first time? I will then look into the code myself.
February 2, 2018 at 15:57 #187544RaduModeratorHi,
We haven’t changed the functionality of redux it’s work in normal way.
The default ( standard ) values of the every input it’s handled by the redux framework.
So on theme activation redux do the job so there it’s used the hooks that redux uses.
here’s the action triggered by the redux after theme switch/activation.PATH TO FILE : wp-content/themes/kleo/kleo-framework/options/inc/class.redux_api.php
https://codex.wordpress.org/Plugin_API/Action_Reference/switch_theme
On this file we build effective the redux sections with default values : wp-content/themes/kleo/lib/options.php
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 3, 2018 at 13:45 #187604MichaelPParticipantThanks! I have an idea now what causes the issue, but I need to verify it when the problem occurs again. I added the code below to functions.php, so I will get an email whenever Kleo options are updated. I will then have a closer look.
add_action(‘update_option’, function( $option_name, $old_value, $value) {
if(preg_match(‘/.*kleo.*/’, $option_name)) {
$old_value = print_r($old_value, true);
$value = print_r($value, true);
$log = $option_name . “\nOld value:\n” . $old_value . “\nNew value:\n” . $value;
wp_mail($admin_mail, $option_name, $log);
}
}, 10, 3);I will report back if I find something, but it might take a few weeks because the problem only occurs occasionally.
Thanks a lot for the help!
February 5, 2018 at 16:01 #187834RaduModeratorHi,
Good!
Have a nice day
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.