Thesis 1.5 on WordPress 2.8RC

by Rick Beckman on

Due to my growth & multiple changes in my worldview over the years, this post is considered “archived” and is offered here for historical purposes only. Opinions offered above may not necessarily reflect my current beliefs, though you're still more than welcome to participate in the comments, discussing anything from the post. Thank you for understanding.

Thesis Theme for WordPress The next version of Thesis will include rockin’ WordPress 2.8 compatibility and work has progressed toward that end in SVN. However, if you’re wanting to use the latest, greatest version of WordPress, which is now available in release candidate flavor, you’re either going to have to survive without a widgets panel for the time being, or you can apply this quick fix.

By now, I hope you are running Thesis 1.5.1, which works perfectly with WordPress 2.8 (which you should also be running by now) and makes the following code edits completely unnecessary. Enjoy. :)

Open the file wp-content/themes/thesis/lib/admin/admin.php (your thesis/ directory may be named something 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 Thesis’ admin panel styles and JavaScript. The problem lies in that our JavaScript interferes with WordPress' new widget handling on the Widgets panel. This is simple enough to rectify. 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 proper place on your server, and enjoy!

Now for the following N.B., which I strongly suggest you do not skip if you are not prepared to troubleshoot things that go wrong:

If you're not using WordPress 2.8, there's no need to make the above change!

If you're not using version 1.5 of Thesis, you may not have to do anything. Honestly, I don't know as older versions are not being tested against cutting edge WordPress code. You are urged to upgrade to Thesis 1.5.

Ordinarily, core edits of Thesis are not only not encouraged but are actively discouraged in the interest of quick and easy upgrades. In this instance, because the upgrade will alleviate the need to make this core file modification, there's no risk. Enjoy.

Okay, I lied when I said there was no risk! Modifying core files can completely and utterly destroy your site! Ensure that you have an unchanged, working copy of wp-content/themes/thesis/lib/admin/admin.php so that you can revert back to if need be.

Everything else in Thesis should work fine on the new version of WordPress, but if any other issues come up, please report it on our support forums! Your help in reporting bugs helps make Thesis better for everyone!

{ 42 comments in the conversation. Add yours! }

faryl

This is great news :-)

Thank you for putting this info together!

Reply

Nathan W. Bingham FlickrGravatar

Rick: I’ve just upgraded to WP 2:8RC1 and am running Thesis 1.5, but cannot replicate the problem you’re referring to above. Could expand on the exact issue so I can see if I’m “suffering” and whether I need to make the core code change.

Further, do you know when an update will be released that fixes any WP2.8 issues officially?

Reply

Mark Settle

Rick, this is great stuff. I invite you guys to consider it for a Thesis 1.51RC, if for no other reason that when 2.8 goes final on Tuesday, many WP auto-installers will default to it. Anyhow, thanks!

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

The exact problem was that the WordPress Widgets panel didn’t work; the JavaScripts included by Thesis prevented the drag and drop functionality of the widgets which pretty much defeated the whole purpose of the page.

Also, I have no control over releases or our schedule — my personal schedule is crazy over the next few days, that’s all I know — but Chris may push for a release. I dunno. :)

Reply

xphunt3r Gravatar

Rick is just right the drag drop widget is not working in wp 2.8. I already have this problem with beta. I was thinking it is the bug from wp 2.8 but its the problem of thesis.

Reply

The CC Imam Suharjo lahir di Gunungkidul, saat ini di Jogja. Belajar & mendalami IT, Blog ini tempat Sharing, semoga Bermanfaat. Profil ada di www.imm.web.idFlickrGoogle+YouTubeGravatar

Wordpress We Like like, Still Waiting for Stable version 2.8 )

Reply

Anthony

Hi Rick,

I’m writing a plugin for a client, in which I add an admin page for options under Appearance. (add_theme_page())

On this page, I use wp_enqueue_script('jquery-ui-tabs'), and I’ve discovered that this still clashes with the fix you describe here. I realize there’ll be a new Thesis version released soonish, but figured you should know.

In the Thesis file /lib/admin/admin.php is a function called thesis_options_js() which echo’s [script] tags. Better to use wp_enqueue_script(), and to use the jQuery that comes with WordPress, instead of the version you included with Thesis.

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

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Thanks, Anthony. My fix above was the quickest, easiest thing to get Thesis working right away. Enqueuing the scripts via WordPress’ functions is definitely the way to go, and I sent Chris a pointer to your site and fix. Thanks again!

Reply

Mike Haydon LinkedInGravatar

It worked!! thanks so much!

Reply

Miguel Alvarez

This works!!!! thanks.

Reply

Jeffrey Robison I am very happily married to Sharon; Father to Gabby and Joe; Master to Maggie, Sam, and Sally (our dogs); Friend to many; Pastor to Beatrice Baptist Church and a passionate follower of Jesus Christ.Gravatar

Thanks bunches. It worked fine.

Reply

ella

Rick, you rock. Thank you! Solved my drag and drop problem with FF 3.0.10.

(Love the Celtic cross, btw)

Reply

Jessica The Rock Chick Gravatar

Thank you for posting this, Rick. Completely solved my drag and drop widget problem!!!

Reply

John Diep

All, dude – THANK YOU so much for getting this together. It works!
Also, everyone, please try out http://www.followornot.com. Thanks!

Reply

Avinash Gravatar

Thank you rick, i was almost wild when i saw widgets not working in my Admin panel with Thesis installed.

Your fix worked great. Thank you again

Reply

Matt

Another way to get around this for the time being is click on “screen” and “accessiblity mode”. This lets you move your widgets to the sidebars and configure them for the time being until Thesis is updated. It’s a LOT easier and requires no code modification.

Reply

Josh Auriemma

Worked like a charm, thanks man!

Reply

Karen Gravatar

I just tried this fix, and it killed the stylesheet for my Thesis options panel. Any ideas for how I can fix the widgets and keep the same functionality in my options panel?

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Updating to Thesis 1.5.1 makes the above fix completely unnecessary. WordPress 2.8 and Thesis 1.5.1 play perfectly together. :D

Reply

Heather Allard Gravatar

You fixed it, you fixed it!! Thank you SO MUCH.

Heather Allard
The Mogul Mom

Reply

robert Gravatar

Kingdom,

You state above ,” Updating to Thesis 1.5.1 makes the above fix completely unnecessary. WordPress 2.8 and Thesis 1.5.1 play perfectly together”.

Well I have Thesis 1.5.1 and upgraded to W2.8 but I still have a widget problem!

ie: I drag a text widget over to sidebar #1 or even to #2 and enter a title then copy/paste a link with an image and click save. Instead of seeing a green save progress bar on the browser bottom toolbar, I see a whirling circle. The circle whirls and stops BUT nothing gets saved. More save attempts meet without success. Redoing the entire exercise also fails to result in a new and save widget to my sidebar. No evidence appears on the sidebar either.

What could this be? Any ideas?

Regards

RB@p45camp

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Sounds like a different issue, probably unrelated to Thesis. Have you tried with all other plugins disabled?

Reply

Deana G.

This is definitely a Thesis issue. Until this is fixed, you can temporarily activate a different theme, drag and drop your heart out and then reactive Thesis.

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Just upgrade Thesis. The issue already has been fixed. ;)

Reply

Deana G.

Yay! Indeed, the upgrade fixed it beautifully! For those who need a tutorial on how to download/install, just jump over to the downloads page and you’re good to go. Thanks for the quick fix! LOVE THESIS!!! :)

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

That was fast. Glad you’re up and running!

Reply

Gary Father of premature twins, Genesis Theme Expert, and Freelance Web Developer in Basingstoke, UK.FlickrGoogle+LinkedInYouTubeGravatar

I’m on Thesis 1.5.1 and I don’t get the text widget working either. Has Chris sneaked another fix into the current download since 1.5.1 was first released?

Reply

pdg Gravatar

I upgraded to Thesis 1.5.1 with version WP 2.8 running and still get frozen widgets. 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!

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

The widgets should work fine with the first available version of Thesis 1.5.1 — that whole release was motivated by the widgets-fix — with WordPress 2.8 (2.8.1 dev versions aren’t required).

If the widgets are still not working, chances are that some other plugin’s JavaScript is breaking things. The source of the problem with frozen widgets was Thesis’ JavaScript being included on that page. Thesis 1.5.1 prevents that, and because Thesis does nothing else to the page, I’m not sure that Thesis *can* break the panel in any other way.

Verify all the usuals:

* All plugins disabled
* All Thesis customizations removed
* All Thesis files uploaded properly
* All caches (browser, WordPress plugin) cleared
* Google Gears disabled (“Turbo” link in the upper-right of admin panel)

and so on.

Reply

pdg Gravatar

Rick,
We tried those suggestions but my widget sidebars are still frozen. I thinking of upgrade to 2.8 beta 1 – but worried it may break something else. Any other suggestions?

Reply

pdg Gravatar

I just figured out what the problem was… I only had to do this for the widgets to work again:

If you are using WordPress 2.8, try this:
1. From the Admin panel click Appearance, then Widgets.
2. Click on the button labeled “Screen Options” in the upper right hand corner.
3. Choose “Accessibility Mode.”

Just in case anyone else has the same problem!!!!

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

pdg: That’s already been reported above. However, if you’re using Thesis 1.5.1, the widgets will work just fine. If not, there’s another plugin or customization conflicting. It’s not Thesis’ fault. Promise. :)

Reply

Gary Father of premature twins, Genesis Theme Expert, and Freelance Web Developer in Basingstoke, UK.FlickrGoogle+LinkedInYouTubeGravatar

Hmm, the only thing I’ve changed is to completely remove Google Gears (it was already disabled, but not uninstallable from within Firefox, so I used Control Panel -> Add/Remove Programs to nuke it, and now my text widget seems to be working just fine. Very odd.

Reply

ap

badass, nice quick fix.

Reply

Naya Gravatar

Thanks, pdg for your easy remedy, I was able to make my widgets work without any coding changes. I was about to look for a new WP 2.8-ready theme even if I liked very much my old Revolution theme.

Reply

robert Gravatar

Rick,

try as I might, I don’t know how to get Thesis to s=display teaser posts beside each other instead of vertically down the left margin.

How do you group teasers in horizontal lines of two or three?

Be well & kind regards

Robert@p45camp.com

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

Side-by-side is the default setup. If they aren’t working that way, there may be a customization or something interfering. You’ll need to ask on the Thesis support board for further help, though, as this isn’t the thread for general Thesis support matters.

Reply

Michael Cowen

Hi Rick,

I am running thesis 151 and am getting this problem?? i tried the script you gave and all hell broke loose on my back end. Do you have any suggestions on what could be causing the problem?

Thanks
Michael

Reply

Michael Cowen

Sorry — missed a point above and got it working. Thanks.

Reply

Slym Gravatar

Rick, you rock… it solved my problem, Thanks!

Reply

dave

I’m using wp 2.8 and thesis 1.6 , tried all of the above and widgets still can’t be dragged across, give up…

Reply

Rick Beckman Student of the sciences, the religions, the science fictions, and the fantasies… But mostly I’m just trying to find my groove in this big, crazy world.YouTubeGravatar

You probably have either outdated scripts cached in your browser or an incompatible plugin activated. For further help, you’ll want to ask at the DIYthemes support board. Thanks.

Reply

Leave a Comment

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

You may use these tags and attributes to format your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <q cite=""> <strike> <strong>

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

{ 2 linkbacks }

Previous post:

Next post: