Sidebar Module and WordPress 2.3


WordPress 2.3 has been released over a week already and I’m still doubtful if I should upgrade now or wait until the bugs and problems subside. Though I’m tempted to update the other sites I’m managing to 2.3, other than my blog, and see what happens. hehe *evil grin*

Anyway… feeling adventurous, (me?? adventurous!? O.o!? ), I took an old wordpress 2.2.3 test site here in the office and upgraded it to wordpress 2.3 using the Subtle theme I used in my live blog. So far so good… copy and paste folders and files via winSCP, making sure not to overwrite the wp-config.php. Now to install each plugin I used… 30 mins and so far no problems…

Let’s see if SBM works… *ACCKKK! I can’t add sidebar widgets!*

Something was really broken in the SBM plugin. Checking firebug, I found out that a function was redeclared in another file. Further more, there are files in WP 2.2.3 that are no longer in WP 2.3!!! O__o?!

This totally broke the SBM plugin. SMB was including admin-db.php, which was one of the files no longer in WP 2.3 admin folder. And since I did a copy-paste of WP 2.3 over the old WP 2.2.3, the admin-db.php file was not overwritten or deleted. This was what made the redeclaration function sprout. Below is a list of php files no longer in the admin folder for WP 2.3.

  • admin-db.php
  • upgrade-schema.php
  • upload-functions.php

… there were other files also but they were css and js files though.. nothing threatening.

One thing for sure… once I do upgrade to WP 2.3, a total wipe for wp-admin and the wp-includes folder is in order. This will make sure I don’t redeclare functions that were transfered to another file.

Oh, to make SBM plugin word again, a small hack is in order. Open SBM.php file in any text editor and go to the last few lines of the page. Locate :

require_once(ABSPATH . ‘wp-admin/admin-db.php’);

and comment that out… SBM should work now. =)

Update: Seems like Scriptaculous’ latest version broke some parts of SBM in WP 2.3. ‘Some’ in a sense that sidebar 2 widgets are not shown in the SBM panel of Subtle theme, but the widgets will appear in the main index page or whatever page you place them. One suggestion I can give is to take the old Scriptaculous js, rename the new Scriptaculous file and use the old one during your modification then re-replace the old with the new when your done. It’s tedious but its temporary and hope that the original author can change the codes or someone can update the SBM code. (sigh) This is just a temporary fix for you to be able to move the widgets around.

, ,

21 responses to “Sidebar Module and WordPress 2.3”

  1. It first worked for me. But I now have a problem. The first module I added to the sidebar is visible in SBM, but the second, third, etc. are not visible. They appear in my blog, but I cannot access them from SBM!!! How do I edit/remove them now?

    Thank you

  2. Hmmm.. ic… did you get any errors? What does firbug say? I’ll check on this when I get to my test machine tom. 😉

    Update: Hmmm.. it seems I missed a bug in sidebar #2, would that be the problem?

    Update2: I think the problem resides in the new Scriptaculous JS, I change the Scriptaculous file under the wp-include\js\scriptaculous\ folder and the sidebar 2 came out… hmm.. weird.. wonder why I didn’t notice this before…

  3. I get the following error when trying to activate SBM:

    Plugin could not be activated because it triggered a fatal error.

    Any ideas how to resolve?

  4. Hi,
    Thanks for the tip. I tried it and the plugin seems to work fine but I still can’t add a module. I always get the same error “you must specify a valid module name”. I tried putting in titles without any special characters and still get this problem. Got any ideas on how to solve this?

  5. Hi Jeff,

    Wow I can’t believe it was that simple. Now the modules do get created but my modules can’t be moved and I don’t see them.

    I saw your update and I was wondering, wouldn’t it be just better to replace the scriptaculous with the old file for the time being until SBM works with the new one?

    Let me know what you think and thanks again for the tip.

  6. Hi Louis,
    Glad to see your getting somewhere. So after using th new modified SMB files, did you do the steps stated above?

  7. Hi Jeff,

    Well if you mean commenting out the line in the sbm.php, yes I did.

    But I didn’t notice the comment #4 where you replied a solution regarding the problem on comment #3 which is basically the same problem I’m having right now.

    Actually I didn’t notice it because I don’t know what modifications you made to your scriptaculous js :(.

    Did you add something to the file or you replaced it with an older version?

    Thanks

  8. Hi Jeff,

    I got it haha, finally!!! It works perfectly… I don’t know if I did this right but both the scriptaculous and wp-scriptaculous files had the same error so I got the scriptaculous from the official site and copy pasted the code.

    By the way can you tell me what’s the difference between the scriptaculous and wp-scriptaculous? They’re both the same so why have twice the same file?

    Thanks

  9. Good to hear its ok! 😉

    well from what I see in wp-scriptaculous, it seems that its the file that loads and/or includes the actual scriptaculous file into wordpress.

  10. You sir, are amazing. I was trying to figure this out all day. I was coming so close to just manually editing the theme files myself to make the sidebars work. Thank you so much.

  11. Idetrorce, in what way may i ask? it would be nice also that yo give us your input so that we can also try it out…

    thanks

  12. Wishing that SBM or SBM Reloaded was working for 2.6… Sigh.

    It is so superior to the existing WP widgets system.

    Jeff

  13. Yup, I still using the old SBM here.. until WP supports it… well my main dashboard is the only problem, other than that I can manage.