-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Umbraco 8: Level changes for document-types inheriting compositions is not updating as expected #340
Comments
Hi, I think this works but if you are editing the files you have to be careful of a number of things.
for my test i have basePage (created inside Umbraco) <?xml version="1.0" encoding="utf-8"?>
<ContentType Key="66efd9d0-b997-45c5-9c66-037aa96fe53c" Alias="basePage" Level="1">
<Info>
<Name>BasePage</Name>
<Icon>icon-item-arrangement</Icon>
<Thumbnail>folder.png</Thumbnail>
<Description></Description>
<AllowAtRoot>False</AllowAtRoot>
<IsListView>False</IsListView>
<Variations>Nothing</Variations>
<IsElement>false</IsElement>
<Compositions />
<DefaultTemplate></DefaultTemplate>
<AllowedTemplates />
</Info>
<Structure />
<GenericProperties />
<Tabs />
</ContentType> baseItemPage (created by hand - its a copy of the orginnal itemPage with the key changed (note i just change 39 to 40 at the end of the key)) <?xml version="1.0" encoding="utf-8"?>
<ContentType Key="3f3556e5-3ac2-4fda-b8f9-4b42934a4b40" Alias="baseItemPage" Level="2">
<Info>
<Name>BaseItemPage</Name>
<Icon>icon-item-arrangement</Icon>
<Thumbnail>folder.png</Thumbnail>
<Description></Description>
<AllowAtRoot>False</AllowAtRoot>
<IsListView>False</IsListView>
<Variations>Nothing</Variations>
<IsElement>false</IsElement>
<Parent Key="66efd9d0-b997-45c5-9c66-037aa96fe53c">basePage</Parent>
<Compositions>
<Composition Key="66efd9d0-b997-45c5-9c66-037aa96fe53c">basePage</Composition>
</Compositions>
<DefaultTemplate></DefaultTemplate>
<AllowedTemplates />
</Info>
<Structure />
<GenericProperties />
<Tabs />
</ContentType> itemPage (create in Umbraco but then the Parent, Key and alias, and composition key and alias have changed to be those <?xml version="1.0" encoding="utf-8"?>
<ContentType Key="3f3556e5-3ac2-4fda-b8f9-4b42934a4b39" Alias="itemPage" Level="3">
<Info>
<Name>ItemPage</Name>
<Icon>icon-item-arrangement</Icon>
<Thumbnail>folder.png</Thumbnail>
<Description></Description>
<AllowAtRoot>False</AllowAtRoot>
<IsListView>False</IsListView>
<Variations>Nothing</Variations>
<IsElement>false</IsElement>
<Parent Key="3f3556e5-3ac2-4fda-b8f9-4b42934a4b40">baseItemPage</Parent>
<Compositions>
<Composition Key="3f3556e5-3ac2-4fda-b8f9-4b42934a4b40">baseItemPage</Composition>
</Compositions>
<DefaultTemplate></DefaultTemplate>
<AllowedTemplates />
</Info>
<Structure />
<GenericProperties />
<Tabs />
</ContentType> after a sync it looks like this. |
And just to clarify, the above post is still me, I just accidentally used my work account to post :) |
OK, i will need to check this, it might be an Umbraco thing (but will see if i can confirm) - uSync sets the parent item via the Umbraco API, we don't actually set path or level - because these should be (and are usually) calculated when you set the parent. so i wonder if something is going wrong when that happens, will take a deeper dive and see if we can sort the issue. |
Hi I still can't reproduce this locally 😞 My testing below: I have a number of files created by Umbraco and from uSync files. at this point everything appears to be in the right place. if i alter the
|
Hi, thanks for investigating. I will have to figure out if it's something else causing this issue, then. |
@Scherling Same issue here, version 9.2.0 of uSync, umbraco.Cms 9.3.1 The solution that currently works in my case is using import option few times until my pages move to the correct structure. Keys are fine, whole configuration is fine. But it is annoying to use import few times until everything sorts out. Not sure what could be the issue for this. |
@mbogunovic +1 we're having the same issue! |
Bug Description
On Umbraco 8 installation (8.16) using uSync 8.10.4
As an administrator when configuring document types, when a document type is created under a composition document type, thus inheriting its properties, the
Level
property for the usync configContentType
element for that document type will correctly be 1 higher than its parent element.However, when manually editing this value afterwards in the usync file, for example needed if you decide to change inheritence structure later by adding an additional layer of inheritance, the
level
field of the umbracoNode is not updated as expected.While the umbraco backoffice is still usable, it does cause some issues when selecting nodes in the tree. Instead of highligting the affected document type node when selecting it, the tree collapses back to a lower level, since the level value is wrong.
To Reproduce
Steps to reproduce the behavior:
BasePage
BasePage
create a new document type inheriting from it calledItemPage
itemPage
thanBasePage
BaseItemPage
ItemPage
BasePage
ItemPage
to the newly createdBaseItemPage
(Thus adding another layer of inheritance in between the existing document types)ItemPage
to be 1 higher, as it is now 1 step lower in the tree structureItemPage
, the value is unchanged, even though it has changed in the config fileExpected behavior
The level value in the umbracoNode table in the database, should reflect the Level value in the usync config file after running the import
The text was updated successfully, but these errors were encountered: