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.


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

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

Bad widget class name given


5 Posts   2001 Views


19 August 2008 at 10:17am (Last edited: 19 August 2008 10:18am), Community Member, 63 Posts


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.


19 August 2008 at 11:14am Forum Moderator, 5511 Posts

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"));


19 August 2008 at 2:59pm Community Member, 63 Posts

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.


9 September 2008 at 11:01pm Community Member, 37 Posts

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!


10 September 2008 at 12:59am (Last edited: 10 September 2008 1:00am), Community Member, 6 Posts


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' "?