umbraco-doc-type-grid-editor
umbraco-doc-type-grid-editor copied to clipboard
(Our.Umbraco.DocTypeGridEditor.Models.UnpublishedContent).Children is always null?
trafficstars
umb 9.0.1 and dtge 9.0.0- rc001
having an issue only when udpating properties in a dtge in the backoffice Using the umbracoContextAccessor to get the current node
// umbraco node that is currently rendered
IPublishedContent currentPage = _umbracoContextAccessor.GetRequiredUmbracoContext().PublishedRequest.PublishedContent;
DepartmentPastResultPage saleReport = currentPage.FirstChild<DepartmentPastResultPage>(x => x.SaleId == sale.SaleId);
hitting submit to update dtge property then results in error as currentPage has no children.
currentPage at this point seems to be a Our.Umbraco.DocTypeGridEditor.Models.UnpublishedContent and not IPublishedContent/
https://github.com/skttl/umbraco-doc-type-grid-editor/blob/8830b2362bbd1d2666ee6caee4782e4e95c97c92/src/Our.Umbraco.DocTypeGridEditor/Models/UnpublishedContent.cs#L34
seems to not be implemented?
I've got around this presently by wrapping in
if (currentPage.GetType() == typeof(IPublishedContent))
{...}
the backoffice does render as expected, so I'm guessing this is a transient intermediary step?