WordPress K2 Theme Sidebar Manager Broke My Site

This post is for WordPress admins who find their sites suddenly not displaying right after working with the K2 theme sidebar manager.

Configuration:
As of this writing, I am using WordPress 2.3.3 with release 4 of the K2 theme. I have the following active plugins: Akismet 2.1.3, Gravatars2 2.7.0, Gravatars2 WP-Cron 1.1, Subscribe To Comments 2.1.2, WordPress Database Backup 1.7.

Background:
I was configuring the K2 Sidebar Manager with the modules I wanted displayed and the order in which I wanted them displayed. I was working with three columns and also had one custom “Text, HTML, and PHP” module that I was using for Google Adwords. As I made changes, I was flipping over to another browser tab to take a look at my site. I think I had just removed a sidebar module and changed the order of existing modules – to tell the truth, I don’t remember the last change made. However, the site stopped displaying correctly. In Firefox you could see the top header and the three column format and the text on the page. The page background behind the text had disappeared displaying the site’s black color background throughout everything. I run a three column format with the posts in column 1, site navigation modules in column 2, and Google Adwords in column 3. Everything but the site search had disappeared.

What I tried that failed (not necessarily in this order):

  • Going back to the K2 sidebar manager and adding and removing modules to reflect some kind of change in the page.
  • Changing from 3 to 2 columns and back again. It didn’t work either way.
  • Under K2 Options, deactivating the K2 sidebar manager. It worked without it! When I activated it again, it didn’t work anymore.
  • Changing themes to my previous non-K2 theme. The site worked with the old theme! When I changed back to K2, it didn’t work anymore.
  • Cleared all cache, cookies (pretty much everything) in the Firefox browser. Nope.
  • Changed to Internet Explorer. Same problems except the interpretation of the CSS left me with the white page background so it looked better but the sidebar manager modules were still not working.

The fix:
Looking at the database tables for WordPress, under the table “wp-options” there is a record with an “option_name” of “k2sbm_modules_active”. When you look at the MEMO field under “option_value” this is where all of the K2 sidebar manager settings are stored. Mine was fubar’d somehow. I have several WordPress blogs that I  administrate. I was initially leery of just deleting the field so I copied the contents from the field of a newly installed WordPress with K2. This fixed the site. So, afterwards – now that I was comfortable I could fix things – I deleted the contents of the field. This worked fine. Afterwards I went back into my K2 sidebar manager and set everything back up the way I wanted. Everything worked fine.

What to do in the future:
There is a  “restore” and “backup” button at the top of the K2 sidebar manager. Once you have made changes in your sidebar manager, click the “backup” button. This will save a data file to your computer with – guess what? – the value of the “k2sbm_modules_active” field. To test, I saved my setup, went into the database and deleted the value manually, and then restored. Everything worked great.

Hope this helps somebody out! Leave me a comment if you find it helpful. 🙂

This entry was posted in Computers & Internet. Bookmark the permalink.

6 Responses to WordPress K2 Theme Sidebar Manager Broke My Site

  1. Scott Cramer says:

    Highly recommend upgrading to the latest K2 release (K2 release 6 as of this writing).

  2. Karen says:

    Thank you! I found your article by doing a google search for my dilema, I had the exact problem you had except with WP 2.6 a K26

  3. hafidz says:

    need help… my site using latest k2-1.0-RC7.3-revision-791-2009-05-07 (nightly) and wp 2.7.1. it’s not displaying right under macosx (FF, safari, etc), Google chrome under windows. but everything is ok when opened from window’s firefox

  4. hafidz says:

    my sidebar displayed under post 🙁

  5. charlesss says:

    Finally found the info I needed thanks to your great blog, thanks! ^^

  6. Scott says:

    PLEASE NOTE — I’m no longer using the K2 theme. I’m leaving the post out here just in case anyone else might find it useful.

Comments are closed.