Tag Archive for 'curl'

Tarski theme hangs Wordpress

I spent a couple hours trying to diagnose why I couldn’t log into one of my blogs that used the Tarski theme. Every time I tried to login Wordpress would just hang forever. At first I thought it might be due to the Wordpress 2.5.1 update so I reinstalled. Then I thought it might be a database corruption so I created a new database and imported all my entries. Then I thought maybe it’s the plugins so I removed all plugins. Nothing seemed to work. But then I noticed that there were “edit” links on my blog entries - indicating that I was successfully logged in. So I clicked on the “edit” link and discovered I was able to edit entries. I just couldn’t get to the Dashboard or Tarski Options. So I tried going to the Tarski theme website looking for a possible solution - only to find that their website was not responding. That gave me a clue to start looking through the Tarski theme files for callbacks to the Tarski theme website.

VOILA!

It’s the stupid Tarski theme version checking function that’s hanging because it’s not able to retrieve the atom feed from their website. So I just commented out the code and now my blog is back to normal. The problem lies in wp-content/themes/tarksi/library/classes/version.php. I chose to disable version checking completely by commenting the body of the tarski_update_notifier() function on line 196:

function tarski_update_notifier($location = 'dashboard') {/*
        $tarski_version = new Version;
        $tarski_version->current_version_number();
        $current = $tarski_version->current;
        $svn_link = 'http://tarskitheme.com/help/updates/svn/';

        // Update checking only performed when remote files can be accessed
        if(can_get_remote()) {
                // Only performs the update check when notification is enabled
                if(get_tarski_option('update_notification')) {
                        $tarski_version->latest_version_number();
                        $tarski_version->latest_version_link();
                        $tarski_version->version_status();
                }

                $latest = $tarski_version->latest;
                $latest_link = $tarski_version->latest_link;
                $status = $tarski_version->status;

                if($location == 'options_page') {
                        include(TARSKIDISPLAY . '/admin/version_options.php');
                } elseif(!detectWPMU() || detectWPMUadmin()) {
                        include(TARSKIDISPLAY . '/admin/version_dashboard.php');
                }
        }*/
}

But the problem really lies with the version_feed_data() function on line 66. They need to set the timeout option for CURL and use ini_set(’default_socket_timeout’, $seconds); before calling file_get_contents(’http://tarskitheme.com/version.atom’);

TO THE CREATORS OF TARSKI: FIND A BETTER HOST AND FIX YOUR CODE!!!
TO THEME CREATORS: LEARN FROM THIS LESSON!!!!!