Thesis 1.5 on WordPress 2.8RC

Thesis Theme for WordPress The next ver­sion of The­sis will include rockin’ Word­Press 2.8 com­pat­i­bil­i­ty and work has pro­gressed toward that end in SVN. How­ev­er, if you’re want­i­ng to use the lat­est, great­est ver­sion of Word­Press, which is now avail­able in release can­di­date fla­vor, you’re either going to have to sur­vive with­out a wid­gets pan­el for the time being, or you can apply this quick fix. 

By now, I hope you are run­ning The­sis 1.5.1, which works per­fect­ly with Word­Press 2.8 (which you should also be run­ning by now) and makes the fol­low­ing code edits com­plete­ly unnec­es­sary. Enjoy. :)

Open the file wp-content/themes/thesis/lib/admin/admin.php (your thesis/ direc­to­ry may be named some­thing else), and find this block of code:

function thesis_admin_styles_and_scripts() {
	global $wp_version;
	$new_admin_version = '2.7';
	$installed_version = $wp_version;

	if (version_compare($installed_version, $new_admin_version, '<')) {
		add_action('admin_head-design_page_thesis-options', 'thesis_options_stylesheet');
		add_action('admin_head-design_page_thesis-design-options', 'thesis_options_stylesheet');
		add_action('admin_print_scripts-design_page_thesis-options', 'thesis_options_js_deprecated');
		add_action('admin_print_scripts-design_page_thesis-design-options', 'thesis_options_js_deprecated');
	}
	else {
		add_action('admin_head', 'thesis_options_stylesheet');
		add_action('admin_head', 'thesis_options_js');
	}
}

That is the block of code which queues The­sis’ admin pan­el styles and JavaScript. The prob­lem lies in that our JavaScript inter­feres with Word­Press’ new wid­get han­dling on the Wid­gets pan­el. This is sim­ple enough to rec­ti­fy. Once you’ve found the above block of code, replace it with this new block of code:

function thesis_admin_styles_and_scripts() {
	if ('themes.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
		global $wp_version;
		$new_admin_version = '2.7';
		$installed_version = $wp_version;
	
		if (version_compare($installed_version, $new_admin_version, '<')) {
			add_action('admin_head-design_page_thesis-options', 'thesis_options_stylesheet');
			add_action('admin_head-design_page_thesis-design-options', 'thesis_options_stylesheet');
			add_action('admin_print_scripts-design_page_thesis-options', 'thesis_options_js_deprecated');
			add_action('admin_print_scripts-design_page_thesis-design-options', 'thesis_options_js_deprecated');
		}
		else {
			add_action('admin_head', 'thesis_options_stylesheet');
			add_action('admin_head', 'thesis_options_js');
		}
	}
}

Save the file, upload it to the prop­er place on your serv­er, and enjoy!

Now for the fol­low­ing N.B., which I strong­ly sug­gest you do not skip if you are not pre­pared to trou­bleshoot things that go wrong:

If you’re not using Word­Press 2.8, there’s no need to make the above change!

If you’re not using ver­sion 1.5 of The­sis, you may not have to do any­thing. Hon­est­ly, I don’t know as old­er ver­sions are not being test­ed against cut­ting edge Word­Press code. You are urged to upgrade to The­sis 1.5.

Ordi­nar­i­ly, core edits of The­sis are not only not encour­aged but are active­ly dis­cour­aged in the inter­est of quick and easy upgrades. In this instance, because the upgrade will alle­vi­ate the need to make this core file mod­i­fi­ca­tion, there’s no risk. Enjoy.

Okay, I lied when I said there was no risk! Mod­i­fy­ing core files can com­plete­ly and utter­ly destroy your site! Ensure that you have an unchanged, work­ing copy of wp-content/themes/thesis/lib/admin/admin.php so that you can revert back to if need be.

Every­thing else in The­sis should work fine on the new ver­sion of Word­Press, but if any oth­er issues come up, please report it on our sup­port forums! Your help in report­ing bugs helps make The­sis bet­ter for everyone!

42 thoughts on “Thesis 1.5 on WordPress 2.8RC”

  1. Nathan W. Bingham

    Rick: I’ve just upgrad­ed to WP 2:8RC1 and am run­ning The­sis 1.5, but can­not repli­cate the prob­lem you’re refer­ring to above. Could expand on the exact issue so I can see if I’m “suf­fer­ing” and whether I need to make the core code change.

    Fur­ther, do you know when an update will be released that fix­es any WP2.8 issues officially?

  2. Rick, this is great stuff. I invite you guys to con­sid­er it for a The­sis 1.51RC, if for no oth­er rea­son that when 2.8 goes final on Tues­day, many WP auto-installers will default to it. Any­how, thanks!

  3. The exact prob­lem was that the Word­Press Wid­gets pan­el did­n’t work; the JavaScripts includ­ed by The­sis pre­vent­ed the drag and drop func­tion­al­i­ty of the wid­gets which pret­ty much defeat­ed the whole pur­pose of the page.

    Also, I have no con­trol over releas­es or our sched­ule — my per­son­al sched­ule is crazy over the next few days, that’s all I know — but Chris may push for a release. I dunno. :)

  4. Rick is just right the drag drop wid­get is not work­ing in wp 2.8. I already have this prob­lem with beta. I was think­ing it is the bug from wp 2.8 but its the prob­lem of thesis.

  5. Thanks, Antho­ny. My fix above was the quick­est, eas­i­est thing to get The­sis work­ing right away. Enqueu­ing the scripts via Word­Press’ func­tions is def­i­nite­ly the way to go, and I sent Chris a point­er to your site and fix. Thanks again!

  6. Hi Rick,

    I’m writ­ing a plu­g­in for a client, in which I add an admin page for options under Appear­ance. (add_theme_page())

    On this page, I use wp_enqueue_script('jquery-ui-tabs'), and I’ve dis­cov­ered that this still clash­es with the fix you describe here. I real­ize there’ll be a new The­sis ver­sion released soon­ish, but fig­ured you should know.

    In the The­sis file /lib/admin/admin.php is a func­tion called thesis_options_js() which echo’s [script] tags. Bet­ter to use wp_enqueue_script(), and to use the jQuery that comes with Word­Press, instead of the ver­sion you includ­ed with Thesis.

    Refer: http://www.fergusweb.net/coding/thesis-15-with-wordpress-28/

  7. Jessica The Rock Chick

    Thank you for post­ing this, Rick. Com­plete­ly solved my drag and drop wid­get problem!!!

  8. Thank you rick, i was almost wild when i saw wid­gets not work­ing in my Admin pan­el with The­sis installed.

    Your fix worked great. Thank you again

  9. Anoth­er way to get around this for the time being is click on “screen” and “acces­si­b­li­ty mode”. This lets you move your wid­gets to the side­bars and con­fig­ure them for the time being until The­sis is updat­ed. It’s a LOT eas­i­er and requires no code modification.

  10. Updat­ing to The­sis 1.5.1 makes the above fix com­plete­ly unnec­es­sary. Word­Press 2.8 and The­sis 1.5.1 play per­fect­ly togeth­er. :D

  11. I just tried this fix, and it killed the stylesheet for my The­sis options pan­el. Any ideas for how I can fix the wid­gets and keep the same func­tion­al­i­ty in my options panel?

  12. King­dom,

    You state above ‚” Updat­ing to The­sis 1.5.1 makes the above fix com­plete­ly unnec­es­sary. Word­Press 2.8 and The­sis 1.5.1 play per­fect­ly together”. 

    Well I have The­sis 1.5.1 and upgrad­ed to W2.8 but I still have a wid­get problem! 

    ie: I drag a text wid­get over to side­bar #1 or even to #2 and enter a title then copy/paste a link with an image and click save. Instead of see­ing a green save progress bar on the brows­er bot­tom tool­bar, I see a whirling cir­cle. The cir­cle whirls and stops BUT noth­ing gets saved. More save attempts meet with­out suc­cess. Redo­ing the entire exer­cise also fails to result in a new and save wid­get to my side­bar. No evi­dence appears on the side­bar either.

    What could this be? Any ideas?

    Regards

    [email protected]

  13. This is def­i­nite­ly a The­sis issue. Until this is fixed, you can tem­porar­i­ly acti­vate a dif­fer­ent theme, drag and drop your heart out and then reac­tive Thesis.

  14. Yay! Indeed, the upgrade fixed it beau­ti­ful­ly! For those who need a tuto­r­i­al on how to download/install, just jump over to the down­loads page and you’re good to go. Thanks for the quick fix! LOVE THESIS!!! :)

  15. I’m on The­sis 1.5.1 and I don’t get the text wid­get work­ing either. Has Chris sneaked anoth­er fix into the cur­rent down­load since 1.5.1 was first released?

  16. I upgrad­ed to The­sis 1.5.1 with ver­sion WP 2.8 run­ning and still get frozen wid­gets. Do I also need to upgrade to WP 2.8RC to fix this? Please let me know I need to launch my new site in a few days!

  17. The wid­gets should work fine with the first avail­able ver­sion of The­sis 1.5.1 — that whole release was moti­vat­ed by the wid­gets-fix — with Word­Press 2.8 (2.8.1 dev ver­sions aren’t required).

    If the wid­gets are still not work­ing, chances are that some oth­er plug­in’s JavaScript is break­ing things. The source of the prob­lem with frozen wid­gets was The­sis’ JavaScript being includ­ed on that page. The­sis 1.5.1 pre­vents that, and because The­sis does noth­ing else to the page, I’m not sure that The­sis *can* break the pan­el in any oth­er way.

    Ver­i­fy all the usuals:

    * All plu­g­ins disabled
    * All The­sis cus­tomiza­tions removed
    * All The­sis files uploaded properly
    * All caches (brows­er, Word­Press plu­g­in) cleared
    * Google Gears dis­abled (“Tur­bo” link in the upper-right of admin panel)

    and so on.

  18. Rick,
    We tried those sug­ges­tions but my wid­get side­bars are still frozen. I think­ing of upgrade to 2.8 beta 1 — but wor­ried it may break some­thing else. Any oth­er suggestions?

  19. I just fig­ured out what the prob­lem was… I only had to do this for the wid­gets to work again:

    If you are using Word­Press 2.8, try this:
    1. From the Admin pan­el click Appear­ance, then Widgets.
    2. Click on the but­ton labeled “Screen Options” in the upper right hand corner.
    3. Choose “Acces­si­bil­i­ty Mode.”

    Just in case any­one else has the same problem!!!!

  20. pdg: That’s already been report­ed above. How­ev­er, if you’re using The­sis 1.5.1, the wid­gets will work just fine. If not, there’s anoth­er plu­g­in or cus­tomiza­tion con­flict­ing. It’s not The­sis’ fault. Promise. :)

  21. Hmm, the only thing I’ve changed is to com­plete­ly remove Google Gears (it was already dis­abled, but not unin­stal­lable from with­in Fire­fox, so I used Con­trol Pan­el -> Add/Remove Pro­grams to nuke it, and now my text wid­get seems to be work­ing just fine. Very odd.

  22. Thanks, pdg for your easy rem­e­dy, I was able to make my wid­gets work with­out any cod­ing changes. I was about to look for a new WP 2.8‑ready theme even if I liked very much my old Rev­o­lu­tion theme.

  23. Rick,

    try as I might, I don’t know how to get The­sis to s=display teas­er posts beside each oth­er instead of ver­ti­cal­ly down the left margin.

    How do you group teasers in hor­i­zon­tal lines of two or three?

    Be well & kind regards

    [email protected]

  24. Side-by-side is the default set­up. If they aren’t work­ing that way, there may be a cus­tomiza­tion or some­thing inter­fer­ing. You’ll need to ask on the The­sis sup­port board for fur­ther help, though, as this isn’t the thread for gen­er­al The­sis sup­port matters.

  25. Hi Rick,

    I am run­ning the­sis 151 and am get­ting this prob­lem?? i tried the script you gave and all hell broke loose on my back end. Do you have any sug­ges­tions on what could be caus­ing the problem?

    Thanks
    Michael

  26. You prob­a­bly have either out­dat­ed scripts cached in your brows­er or an incom­pat­i­ble plu­g­in acti­vat­ed. For fur­ther help, you’ll want to ask at the DIYthemes sup­port board. Thanks.

Leave a Comment

Your email address will not be published. Required fields are marked *

Use your Gravatar-enabled email address while commenting to automatically enhance your comment with some of Gravatar's open profile data.

Comments must be made in accordance with the comment policy. This site uses Akismet to reduce spam; learn how your comment data is processed.

You may use Markdown to format your comments; additionally, these HTML tags and attributes may be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Rick Beckman