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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

Blog Widgets not Available with SilverStripe 3?


Go to End


20 Posts   12101 Views

Avatar
Liam

Community Member, 470 Posts

19 July 2012 at 2:28am

Does this actually work?

I'm running a brand new install of SS 3 and blog/widget module from github and I can't get widgets working.

I see in the blog code directory there is a folder for widgets, which I'm assuming are the old ones.

I've installed the standalone widget module and then the blog archive widget that shows links to year/month etc in sidebar but nothing shows up.

In the admin panel for blog, I can see a widget tab but when I view it, it just shows all the widgets in the blog code/widget directory but nothing to install or configure. Just names no links.

Has anybody got this working?

Avatar
Garrett

Community Member, 245 Posts

19 July 2012 at 2:37am

No, it doesn't work. Same deal here. One of the handful of reasons I ditched 3.0.0 for my current project. The widgets tab, although present and has all the items listed -- links are all inactive, as you described. Looks like there is plainly no Edit_Form at all.

//Garrett

Avatar
Liam

Community Member, 470 Posts

19 July 2012 at 3:02am

Okay I assumed as much because it seemed I had everything installed proper but couldn't get it working.

Didn't want to waste any more time with it and then found this thread.

Avatar
drewbs

Community Member, 5 Posts

19 July 2012 at 3:13am

Have not had a chance to fully test it but the interface appears to be working in undfinedoffset's branch. He has a pending pull request.
https://github.com/UndefinedOffset/silverstripe-widgets

Avatar
Liam

Community Member, 470 Posts

19 July 2012 at 8:03am

Edited: 19/07/2012 8:13am

Installed it and it does appear to work with my limiting testing.

Avatar
jere

Community Member, 8 Posts

23 July 2012 at 2:55pm

Edited: 05/08/2012 4:07pm

Yes I've had exactly the same problem with blog widgets showing up but being unable to interact with them at all. Did anyone manage to get this working at all?

Also, in case anyone makes the same mistake I made which left me scratching my head for a while: make sure you install the widget module in the root in a folder called "widget", NOT "widgets".
Note: the above statement turns out to be baloney: seems to work the same whether the directory is called "widget" or "widgets".

One other thing I've noticed: after implementing widgets in Page.php I get the same unresponsive list of widgets in the widgets tab for Page pagetype, but when viewing the widgets tab on BlogHolder pagetype the list of widgets appears twice. Not sure if this is another bug or if I'm missing something (haven't had the time to fully investigate this yet).

Avatar
Jonny

Community Member, 1 Post

26 July 2012 at 2:31am

Edited: 26/07/2012 2:52am

Your widgets display twice because you implemented the WidgetAreaEditor in page.php which is inherited by blog.php. To solve this remove the following two lines from page.php and add them to a newly created page type e.g. PageWithWidgets.php.
"NAMEOFWIDGETAREA" => "WidgetArea"
$fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("NAMEOFWIDGETAREA"));
You will also need to copy page.ss and rename it respectively e.g. PageWithWidgets.ss. Copying page.ss will give you the same layout you had before.
Hope this helps.

PS: I have the same error as you guys regarding the widgets being inactive in SS3. Had anyone solved this? I hope so because this is driving me crazy!

EDIT: Alternatively, to avoid creating a new page type, you could simply comment out the following line(30) in BlogHolder.php and remove the DB entry by running a http://www.mysite.com/db/build.

// $fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("SideBar")); COMMENT OUT

I found this alternative solution on the silverstripe widgets page https://github.com/silverstripe/silverstripe-widgets

Avatar
jere

Community Member, 8 Posts

30 July 2012 at 11:02am

Hi Jonny, thanks for that, I'll play around to decide which is the better option. Meanwhile I guess I'm gonna wait around and hope to hear some more regarding those inoperative widgets.