silverstripe / silverstripe-widgets

Widgets subsystem for Silverstripe CMS
http://silverstripe.org
BSD 3-Clause "New" or "Revised" License
38 stars 55 forks source link

UnsavedRelationList Error with ItemsToRender when no items to return #123

Closed adrian-stein closed 8 years ago

adrian-stein commented 8 years ago

I get the following error when there are no widgets to return

[User Error] Uncaught LogicException: filter can't be called on an UnsavedRelationList

Trace
UnsavedRelationList->filter(Enabled,1) 
WidgetArea.php:59
WidgetArea->ItemsToRender() 
WidgetArea.php:33
WidgetArea->WidgetControllers() 
ViewableData.php:402

Using SS 3.2.3 and widgets 1.2.*@dev

tractorcow commented 8 years ago

Fix in core at https://github.com/silverstripe/silverstripe-framework/pull/5348.

Sorry we probably can't fix this earlier than 3.4.0 because it would likely be considered "adding" api to non-feature releases.

tractorcow commented 8 years ago

Fixed with https://github.com/silverstripe/silverstripe-framework/pull/5348 3.4 will be coming out soon :D update to 3.x for now to get this fix.