2

When setting a bucket as the target datasource location for an SXA Component and a datatemplate the Sitecore.Shell.Applications.Dialogs.SelectRenderingDatasource throws a NullReference exception on rendering:

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.XA.Foundation.SitecoreExtensions
   at Sitecore.XA.Foundation.SitecoreExtensions.Controls.SourcedMultiRootTreeview.GetNodeID(String shortID)
   at Sitecore.Web.UI.WebControls.TreeviewEx.RenderNodeBegin(HtmlTextWriter output, IDataView dataView, String filter, Item item, Boolean active, Boolean isExpanded)
   at Sitecore.XA.Foundation.SitecoreExtensions.Controls.DatasourceMultiRootTreeview.RenderNodeBegin(HtmlTextWriter output, IDataView dataView, String filter, Item item, Boolean active, Boolean isExpanded)
   at Sitecore.Web.UI.WebControls.TreeviewEx.RenderNode(HtmlTextWriter output, IDataView dataView, String filter, Item root, Item parent, Item folder)
   at Sitecore.Web.UI.WebControls.TreeviewEx.RenderNode(HtmlTextWriter output, IDataView dataView, String filter, Item root, Item parent, Item folder)
   at Sitecore.Web.UI.WebControls.TreeviewEx.Render(HtmlTextWriter output, IDataView dataView, String filter, Item root, Item folder)
   at Sitecore.Web.UI.WebControls.MultiRootTreeview.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.HtmlControls.Panel.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.HtmlControls.Border.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at Sitecore.Web.HtmlUtil.RenderControl(Control ctl)
   at Sitecore.Web.UI.WebControls.GridPanel.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.HtmlControls.Border.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at Sitecore.Web.HtmlUtil.RenderControl(Control ctl)
   at Sitecore.Web.UI.WebControls.GridPanel.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControls.Placeholder.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.XmlControls.GenericControl.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.HtmlControls.Border.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.XmlControls.GenericControl.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControls.Placeholder.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   at Sitecore.Web.FormAdapter.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.XmlControls.GenericControl.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControls.Placeholder.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.XmlControls.GenericControl.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at Sitecore.Web.UI.Sheer.ClientPage.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Can buckets not be used? Is this an SXA issue? Are we missing any settings?

PS: When enabling "Buckets" under the View tab in the content editor the dialog will work without a problem. It just doesn't work when this is disabled (which is the default)

1
  • That might be a bug in SXA. I will check that tomorrow and let you know! – Dawid Rutkowski Sep 24 '18 at 17:52
3

I can confirm that it's an issue in SXA. I've registered this in our backlog and it will be fixed in 1.8 release.

Workaround might be hard to implement for you. It would require to override Sitecore.XA.Foundation.SitecoreExtensions.CustomFields.FieldTypes.MultiRootTreeList and change OnLoad() method in which you would need to create your custom DatasourceMultiRootTreeview with properly implemented GetNodeID() method (simple null check is missing there).

1
  • Was it fixed in 1.8? Still not working for me - it says items are not a valid selection. – Mark Gibbons Feb 5 '19 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.