Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Blog Widgets not Available with SilverStripe 3?

Discuss the Blog Module.

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

Page: 1 2 3
Go to End
Author Topic: 4828 Views
  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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?

  • Garrett
    Avatar
    Community Member
    245 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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.

  • drewbs
    Avatar
    Community Member
    5 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

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

  • jere
    Avatar
    Community Member
    8 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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).

  • Jonny
    Avatar
    Community Member
    1 Post

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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

  • jere
    Avatar
    Community Member
    8 Posts

    Re: Blog Widgets not Available with SilverStripe 3? Link to this post

    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.

    4828 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.