• Resolved Beee

    (@beee)


    I am trying to help out a friend with his website (http://www.britanniaclassic.com). There was some malicious code inject and it was down. I cleaned all files and am trying to get his site back online.

    It uses the theme Volemo (not longer active but it works fine).
    In use is also the plugin option-tree. No settings have been changed at all here. If I enter Appearance > Theme Options, I see al presets which were set before (logo etc).

    When I log in I see this notice – > http://imgur.com/jFCtZOx
    But to me it seems the plugin is active ?

    Any help would be tremendously appreciated, i’m stumped…

    http://wordpress.org/plugins/option-tree/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Beee

    (@beee)

    I just came a little further… It seems the template was using a deprecated code. get_option_tree, so I replaced that.

    in header.php it says this code

    if(ot_get_option( 'logo')){
    				$upload_logo = ot_get_option( 'logo' );
    			}else{
    				  $upload_logo = get_template_directory_uri() . '/images/logo.png';
    			}

    so if there’s an uploaded logo, it shows the uploaded logo (from the setting) or else a predefined logo from the template.

    If i then check the settings I see this for the logo: http://imgur.com/4rFjM4p
    but the site shows the standard template logo.

    So I think the settings don’t get recognized or so. Is it possible to reinitialize settings without losing all the presets we have ?

    If I check the (export) settings I see this: http://imgur.com/xX9ctbu

    So imo there are settings but don’t get recognized.

    Thread Starter Beee

    (@beee)

    in the SQL I run into the following in the wp_options table: http://imgur.com/KJKyU4f

    I have the latest version installed (2.2.1), so are these settings redundant ?

    There’s also a table called wp_option_tree with several settings/values.

    Can it be those ‘bite’ each other ?

    Thread Starter Beee

    (@beee)

    Further investigation has learnt, when examining the option_tree_options, the settings aren’t saved in the database (anymore). At least not where I expect them to be saved.

    View post on imgur.com

    I tried to change a setting, but it doesn’t get stored.

    It appears these settings are stored in wp_options, not in wp_options_tree. How do I change that ?

    Thread Starter Beee

    (@beee)

    I reverted back to version 2.2.0 to see what would happen.
    I uploaded the old template, which has get_option_tree in it, instead of ot_get_option.

    Now the logo does indeed reappear, but a lot of other features don’t work (yet).

    Thread Starter Beee

    (@beee)

    I decided to deactivate the plugin, delete all old values in wp_options and update the plugin, reactivate it and then import the settings I had copied in text files.

    That brought me a small step further cause now the welcome title is also shown but the slider still doesn’t show.

    If you look in the source code, lines 50-68 shows the images which should be shown in the slider… but still no dice….

    all code in use is get_option_tree not ot_get_option because that seems to want to retrieve info from the new table, which stores nothing.

    Plugin Author Derek Herman

    (@valendesigns)

    You’ve been busy while I was sleeping.

    The old 1.x plugin used the wp_option_tree table. However, since 2.0 we use the wp_options table instead and the old DB table is there for upgrading from 1.x to 2.x and it shouldn’t exist unless you had an old version installed first. All the theme options data is saved in option_tree and all the settings are saved in option_tree_settings in the wp_options table. The first is the array of theme options data like the value of the logo and colors etc. while the other is the array of settings which tells the theme options page what to show.

    To remove the notice you need to find the action that created the admin_notices in your theme and change the code to reflect the new version of OptionTree and stop complaining when it is actually installed.

    I don’t know why you have options saved in the DB for each individual option when they should all be in the option_tree array that makes no sense at all.

    You have what appears to be more than one issue which I’m sure stems from an old theme and too much DB tinkering. Is this a live site you can give me access to?

    Thread Starter Beee

    (@beee)

    Hi, thanks for the reply….

    I have been digging around and I found some things which surprised me indeed as you can read above. Like things getting saved to the wrong location. They do get stored but not properly.

    As you can see on one of the screenshots, option_tree_version is 1.8.1.1 or so.

    I didn’t install this site. It was delivered to me with a code injected into all php files, which I all cleaned.

    I searched through the theme’s source code and found this

    if( is_admin() ) {
    	function mw_install_optiontree() {
    		if ( current_user_can('update_core') ) {
    			if ( ! is_plugin_active( 'option-tree/index.php' ) ) {
    				echo "<div class='update-nag'><strong>Wait!!! You need to install and activate the OptionTree plugin! (See Help Files)</strong></div>";
    			}
    		}
    	}
    	add_action( 'admin_notices', 'mw_install_optiontree', 3 );
    }

    I changed to ot-loader.php and error is gone…

    The site isn’t mine, so I can’t give you any FTP/DB access (for now).
    I can only give you an admin account to look around in the options/settings or maybe share my screen on Skype.

    If you’re up for either, click my username. mail me at info at that domain and i’ll get it.

    Until I got my hands on it, I doubt it that there was any DB ‘tinkering’.The owner and the one who installed it (a long time ago) aren’t that tech savvy I think (no offence LC, if you’re reading as well 😉 )

    Plugin Author Derek Herman

    (@valendesigns)

    Message sent.

    Thread Starter Beee

    (@beee)

    There were some strange things going on, but with the help of Derek, I managed to figure it out…

    Some old code which looked ok, but wasn’t working properly.

    The plugin works fine, it was not to blame. Just the code calling the plugin wasn’t working properly.

    Derek thanks again for your help. You were a saviour !

    Plugin Author Derek Herman

    (@valendesigns)

    Glad to help. I know how frustrating it can be when you get stuck with a broken project.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘option tree not loading ?’ is closed to new replies.