U4-11018 - Backoffice - Mapping error occurs if no properties exist.

Created by Nik 27 Feb 2018, 12:43:26 Updated by Simon Dingley 09 Mar 2018, 16:40:41

Tags: Unscheduled Regression

Is duplicated by: U4-11023

Is duplicated by: U4-11025

Is duplicated by: U4-11030

If you are using document types to group re-usable blocks/modules then it is unlikely you would add any properties to your container node. As a result, when you click on it in the content tree AutoMapper throws an exception:

Mapping types:
 Content -> IEnumerable`1
 Umbraco.Core.Models.Content -> System.Collections.Generic.IEnumerable`1[[Umbraco.Web.Models.ContentEditing.Tab`1[[Umbraco.Web.Models.ContentEditing.ContentPropertyDisplay, umbraco, Version=1.0.6631.28270, Culture=neutral, PublicKeyToken=null]], umbraco, Version=1.0.6631.28270, Culture=neutral, PublicKeyToken=null]]
 
 Destination path:
 ContentItemDisplay.Tabs.Tabs
 
 Source value:
 Umbraco.Core.Models.Content

'''What did you expect to happen?''' I expected to only see new Info tab, or if applicable see the child items tab with the list view present.

'''Steps to reproduce:'''

Create a new project No starter kit

Create a document type but don't add any properties

Create an instance of this document type in your content tree

See the error :-) It occurs when it tries to load the edit view for the content node.

'''Work around''' Add a temporary property to the document type so it no longer throws the error.

Comments

Sebastiaan Janssen 27 Feb 2018, 13:26:55

Well that is shitty. I can reproduce. It's also not possible to create new documents based on empty doctypes.


Stephan 27 Feb 2018, 13:43:22

reproduced


Stephan 27 Feb 2018, 13:54:23

PR https://github.com/umbraco/Umbraco-CMS/pull/2482

Fixes this very issue, by my tests.

Code changed with commits 64628c0a9d92d5e76a00957119f5c83a09210fe0 and 469d6f9ca30f2f33e5ac07aff5ed0ccbfe8de021 - seems ok but many changes.


Simon Dingley 09 Mar 2018, 15:47:39

I've been hit by this in an upgraded site, no obvious way out at the moment but am going to try and manipulate my usync export to create something in order to recover access to the doctype. I can't even edit the doctype in the Umbraco UI.


Simon Dingley 09 Mar 2018, 16:07:09

I can confirm that I was able to overcome this by adding a tab via the uSync export of the doctype as follows: TabName 0 This then allowed me access to the doctype to add a property and overcome the issue for right now.


Nik 09 Mar 2018, 16:18:44

@ProNotion What version did you upgrade to? it was fixed in 7.9.1 and 7.9.2. Nice workaround for those using usync though :-)


Simon Dingley 09 Mar 2018, 16:40:41

7.9.0 I've yet to do the patch upgrades to those versions. Thanks for letting me know though.


Priority: Critical

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.9.0

Due in version: 7.9.1

Sprint: Sprint 79

Story Points:

Cycle: