Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Bad widget class name given

Go to End

5 Posts   2339 Views


Community Member, 63 Posts

19 August 2008 at 10:17am

Edited: 19/08/2008 10:18am


I am trying get getting Widgets running but I am running in a couple of problems. I downloaded the children widget form the download section and copied the extracted folder in my root silverstripe folder. Then is rebuild the database. After that i added this to my NewsHolder.

    static $has_one = array(
        "SideBar" => "WidgetArea"
    function getCMSFields() {
        $fields = parent::getCMSFields();
        $fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("Sidebar"));
        return $fields;

After that I got a new tab in the admin page as expected. So far as good but when I want to add the children widget to my holder ist fires 2 http requests right after another.


If i press on publish nothing will be displayed after a refresh. :( this is really disapointing :(

Best regards an I hope somebody can help me.


Forum Moderator, 5523 Posts

19 August 2008 at 11:14am

You have called your database field 'SideBar' where as you use 'Sidebar' in your widget area field. They are case sensitive eg this new WidgetAreaEditor("Sidebar")); needs to be new WidgetAreaEditor("SideBar"));


Community Member, 63 Posts

19 August 2008 at 2:59pm

Oh yes I am so dumm :( thx a lot. some times you don't see the forest cause of so mutch trees.

I have an other questions about the widgets. Is it possible to add a widget to a holderpage and the children inherits this widget ?? So that I just have to add a widget one time to affect all pages. Is this possible and how could i realize it.


Community Member, 37 Posts

9 September 2008 at 11:01pm

Hello i have the same problem even if i made the said changes, rest look same like that, only if i try to save, it logs me out, comin back in and draggin the widget to the holder, it dissapears immediatly, can somebody give me an exact step by step installation guide for widgets? the one in the docs, is too difficult for me as not every step is explained and, as my language is german basiclly!


Community Member, 6 Posts

10 September 2008 at 12:59am

Edited: 10/09/2008 1:00am


I posted already here
but after posting I got firsts a "Bad widget class name given" error while draging the widget to the right into the "Widgets currently used" field and then, after "/?flush=1" it seemed to work. I could put in some content but again, I can see my widget only by adding simultaneous a "virtual page" to my site.

So what happens when I add a virtual page? Is there something being activated in a "virtualPageScript" or something why you can see this "virtual page 'widget' "?