Jump to:

796 Posts in 409 Topics by 304 members

Widgets

SilverStripe Forums » Widgets » WidgetAreaEditor not functioning

Discuss SilverStripe Widgets.

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

Page: 1 2
Go to End
Author Topic: 1342 Views
  • DubbeleJ
    Avatar
    Community Member
    9 Posts

    WidgetAreaEditor not functioning Link to this post

    Hello,

    For our union we developed our site in silverstripe version 2.4. Recently we started upgrading the website to version 3.0 in our test environment.

    Now I wanted to restore our widget functionality. In order to do this I downloaded the module code from:
    https://github.com/silverstripe/silverstripe-widgets
    I then followed the instructions and added a widget area to the page.php file in my "mysite/code/page.php" file.
    Next I created a simple text widget to test the widget functionality.

    I performed a dev/build?flush=all in order to get the widget module to work.

    The problem I now have is that it does not me that there is a widget, however I cannot do anything with it. There are no controls whatsoever.
    The questions I now have are:
    - How far is the development of this widget module, is this editing area not supposed to work?
    - If it should work, are there things which I might have forgotten while installed in the widget module?

    Any help or pointers to documentation regarding this would be helpfull. (I already read the Readme of the widget module, nothing in there could help me out).

    I also attached a screenshot which displays the WidgetAreaEditor as I see it.

    Attached Files
  • Hattori
    Avatar
    Community Member
    20 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    The official branch for widgets doesn't work.

    Use this one for now until the pull request is accepted.

    https://github.com/UndefinedOffset/silverstripe-widgets


    - Liam

  • DubbeleJ
    Avatar
    Community Member
    9 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    Thank you for your response, this appears to do the trick.

    Sincerely,
    Jan Jaap

  • DubbeleJ
    Avatar
    Community Member
    9 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    I still have issues with the widgets.

    The administration area of the widgets is now working. However widgets do not load on the pages.
    When I have a page with a $Sidebar area, but no widgets in that $Sidebar -> the page loads fine.

    However as soon as I put a widget on the $Sidebar area, the page does not load at all and I get a server timeout/disconnect on that particular page.

    Any ideas what is causing this behaviour, are there still bugs in this implementation of widgets or might there be something wrong with the widget I put on there?

  • ABK
    Avatar
    Community Member
    2 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    I have also followed the instructions to get widgets working in SS3 but have hit a wall. I have tried the branch that Hattori suggested but it made no difference. I have attached a print screen of the blog page widget area. I have also tried to set widgets up on each page as well but these widget tabs have nothing but a blank grey space not even the Inherit from parent option.

    Any help on this would be great as it is the only thing stopping me from upgrading all our sites to SS3.

    Thanks,
    Alex

    Attached Files
  • stefant42
    Avatar
    Community Member
    14 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    got the same problem

  • swaiba
    Avatar
    Forum Moderator
    1796 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    Hi,

    I've tried both...

    https://github.com/silverstripe/silverstripe-widgets
    and
    https://github.com/UndefinedOffset/silverstripe-widgets

    the silverstripe one fails as DubbeleJ has indicated, and Undefined Offest fails when trying to add a widget, but it is further along than the rest

  • DubbeleJ
    Avatar
    Community Member
    9 Posts

    Re: WidgetAreaEditor not functioning Link to this post

    The Widget as provided by UndefinedOffset does work. We figured out the display issue:

    Main issue is when using the $Content variable in your Widget template. This will load the main content, which will then load the widget, which will then load the main content -> etc. etc. This causes an infinite loop.

    After fixing this by using our own defined variables for the widgets, for example for our text widget we now use:
    $WidgetTitle
    $WidgetContent
    The page renders just fine with the widgets.

    Regards,
    Jan Jaap

    1342 Views
Page: 1 2
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.