• I am working on a WPMU install with 500+ sites using a custom theme.

    Recently after upgrade of WPMU 2.7 to wordpress 3.1, we encountered a strange problem.

    when going to sitename.com/wp-admin/widgets.php all widget areas show no widgets in there, but it shows up on the site just fine, now if we add a widget, all other widgets which were showing up on the site go away and only the new one is shown — which itself vanishes if we reopen/refresh sitename.com/wp-admin/widgets.php

    The sidebar was registered using (for example):-

    register_sidebar(array(
                             'id' => 1,
                             'name' => "Homepage",
                             'before_widget' => '<td><div class=\'something %2$s\'><div class=\'somethinginside\'>',
                             'after_widget' => '</div></div></td>',
                             'before_title' => '<h3 class=\'generic\'>',
                             'after_title' => '</h3>',
                             ));

    This was fixed by changing this to :-

    register_sidebar(array(
                             'id' => 'something-1',
                             'name' => "Homepage",
                             'before_widget' => '<td><div class=\'something %2$s\'><div class=\'somethinginside\'>',
                             'after_widget' => '</div></div></td>',
                             'before_title' => '<h3 class=\'generic\'>',
                             'after_title' => '</h3>',
                             ));

    But in doing so, all widget selections got reset and we have to re-create all customizations by hand again — which is a LOT of work for 500+ sites…

    Since all of this is being done on a dev enviornment, so nothing is actually lost…

    My question is this : How do i rename sidebar name directly in the mysql database, so earlier customizations can be updated to the new naming convention via a script which we can run during the upgrade process.

    Is there any good documentation explaining the options table and how sidebar and widget stuff is stored?

    Thanks in advance.

The topic ‘Renaming sidebar id in database?’ is closed to new replies.