Tuesday, April 12, 2011

Sidebar Generator plugin for Wordpress 3.1 issues resolved

Hello all of you out there frustrated with the Zero response to the issues with the Sidebar Generator. I had a word press site that used this plugin and after upgrading it no longer worked or appeared to.

After playing with the plugin and testing it after the 3.1 upgrade is related to the saving the post. It turns out that the database table wp_postmeta was getting populated with a JSON string of php output

SELECT * FROM `wp_postmeta` where meta_value like '%<?=$i?>%'

<select name="sidebar_generator[<?=$i?>]">

Just replace the lines with this one
<select name="sidebar_generator_replacement[<?php echo $i; ?>]">

Link to updated plugin working on Wordpress 3.1.0


Stumble Upon CodePyro

12 comments:

Anonymous said...

its broken in version 3.1.1

Josh said...

Hrm, I just upgraded to 3.1.1 and its of course working for me on windows and on a linux server. Are you sure you replaced the sidebar_generator.php file in the plugins folder?

Try looking in your wp_postmeta db table and see whats being saved for the sidebar generator entries.

Anonymous said...

I replaced sidebar_generator.php with your file and fallowed the plugin directions but nothing happens. I assign the sidebar areas in edit post area but sidebars remain the same. I'm using wordpress 3.1.1 and looked in wp_postmeta db table but I'm not sure what I should be looking for. Maybe it's something I'm doing wrong. Please help...

Josh Tischer :: CodePyro said...

If i remember right you need to look for the sbg_selected_sidebar_replacement key with value of

Anonymous said...

Hi Josh,
I am Matteo, a newbie, so forgive my "ignorance" but I would need, if possible, some detailed instructions to work out something with the same problem.
I have:
*Theme Twenty Ten 1.1 - WordPress 3.0.1
*installed "Sidebar Generator" Replacing dynamic_sidebar() with generated_dynamic_sidebar()in both php files as per installation instructions
*replaced sidebar.php with your download file

but it will not work.

Moreover in the "Edit Page" section appears the "Custom Fields" window where the "sbg_selected_sidebar_replacement" key is one of the two possible selections. (I do not know if I should do something with it)
After, through the cPanel - phpMyAdmin I look at the "wp_postmeta db" but I have no idea what to do.
In which file and how your replacement "select name="sidebar_generator_replacement[]" should it be written?
I can't see the string in the db file and I do not know how to intervene.

Does it make sense what I wrote? Or am I in a "la-la-land"?
Thank you in advance for your patience.

Josh Tischer :: CodePyro said...

Hello Matteo,

My post on this issue isnt really that clear so I apologize for that. You need to replace the lines in the sidebar_generator.php file in the plugins folder.

Here is a copy of the one I changed.
Sidebar Generator zip

The database check in the wp_metapost table was really just an indicator. Once you make the file change and save the first replacement all should be well. If your still having issues shoot me an email info@codepyro.com.

Kristian Andersen said...

Hey Josh

I can't get your fix of the sidebar generator to work either. The sidebar never gets outputted. I downloaded your version of the plugin file from this blog.

When i query wp_postmeta for keys of value 'sbg_selected_sidebar_replacement' i get a json output aswell:
a:5:{i:0;s:9:"Sidebar A";i:1;s:1:"0";i:2;s:1:"0";i:3;s:1:"0";i:4;s:1:"0";}

Thanks for taking the time to read.
Kristian

Jacco said...

Hey there,..

I followed all the instructions mentioned above,. but i also can't seem to get it working.

I'm using wordpress 3.0.1

Josh Tischer :: CodePyro said...

can you post or email me a link to the site or a beta version?

Do the sidebars load in the admin? That is can you add a sidebar and content, but its not rendering in the front side page?

Tim said...

Anymore updates on this?

or could you provide a full download of the plugin with the fix.


most people are not code savvy, so it gets confusing

Josh Tischer :: CodePyro said...
This comment has been removed by the author.
Josh Tischer :: CodePyro said...

Make sure to read the readme.txt that comes with the plugin.


dont forget to replace all of your sidebar function calls in your templates.

example
//dynamic_sidebar('Primary Widget Area');

generated_dynamic_sidebar('Primary Widget Area');

Post a Comment