Skip to content
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

Unable to convert nested Archetypes #4

Open
AaronSadlerUK opened this issue Mar 30, 2021 · 0 comments
Open

Unable to convert nested Archetypes #4

AaronSadlerUK opened this issue Mar 30, 2021 · 0 comments

Comments

@AaronSadlerUK
Copy link

When trying to convert an Archetype data type which contains a nested / child Archtype it will throw an exception of key already used in the dictionary.

I've narrowed this down to the line below being hard coded

I changed this to: propertyGroup.Name = fieldset.Label in my copy to solve this.

However the next issue is that Nested and Archetype behave differently, a nested datatype can only use a doctype once with a single tab once, it cannot use a doc type multiple times, with a different tab.
This means if it completes any items which have nested archetypes are lost (or cannot be visually displayed)

The screenshots attached so the data structure.

(Doctype property)
image

(Data type)
image

Config Model:
{"showAdvancedOptions":true,"startWithAddButton":true,"hideFieldsetToolbar":false,"enableMultipleFieldsets":true,"hideFieldsetControls":false,"hidePropertyLabel":false,"maxFieldsets":null,"enableCollapsing":true,"enableCloning":true,"enableDisabling":true,"enableDeepDatatypeRequests":false,"fieldsets":[{"alias":"article","remove":false,"collapse":true,"labelTemplate":"{{articleTitle}}","icon":"icon-article","label":"Article","properties":[{"alias":"articleTitle","remove":false,"collapse":true,"label":"Article Title","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","required":true,"aliasIsDirty":true},{"alias":"articleImage","remove":false,"collapse":true,"label":"Article Image","helpText":"","dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59","value":"","aliasIsDirty":true},{"alias":"articleIntro","remove":false,"collapse":true,"label":"Article Intro","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","aliasIsDirty":true},{"alias":"articleText","remove":false,"collapse":true,"label":"Article Text","helpText":"","dataTypeGuid":"c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3","value":"","aliasIsDirty":true},{"alias":"link","remove":false,"collapse":true,"label":"Link","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","aliasIsDirty":true},{"alias":"linkText","remove":false,"collapse":true,"label":"Link Text","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"READ THE FULL ARTICLE HERE","aliasIsDirty":true}],"aliasIsDirty":true,"$$hashKey":"1A4"},{"alias":"twocolumnarticles","remove":false,"collapse":true,"labelTemplate":"","icon":"icon-thumbnails","label":"2 Column Articles","properties":[{"alias":"articles","remove":false,"collapse":true,"label":"Articles","helpText":"","dataTypeGuid":"3e86c2ae-e1db-41b6-99b0-3f9a01bc5748","value":"","aliasIsDirty":true}],"aliasIsDirty":true,"$$hashKey":"1A5"},{"alias":"advert","remove":false,"collapse":true,"labelTemplate":"{{advertLink}}","icon":"icon-picture","label":"Advert","properties":[{"alias":"advertImage","remove":false,"collapse":true,"label":"Image","helpText":"","dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59","value":"","aliasIsDirty":true,"required":true},{"alias":"advertLink","remove":false,"collapse":true,"label":"Link","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","aliasIsDirty":true}],"aliasIsDirty":true,"$$hashKey":"1A6"},{"alias":"twocolumnadverts","remove":false,"collapse":true,"labelTemplate":"","icon":"icon-pictures-alt","label":"2 Column Adverts","properties":[{"alias":"adverts","remove":false,"collapse":true,"label":"Adverts","helpText":"","dataTypeGuid":"fa594a7a-3041-485a-9ec0-ac6d1a546c06","value":"","aliasIsDirty":true}],"aliasIsDirty":true,"$$hashKey":"1A7"},{"alias":"competition","remove":false,"collapse":true,"labelTemplate":"{{competitionTitle}}","icon":"icon-trophy","label":"Competition","properties":[{"alias":"competitionTitle","remove":false,"collapse":true,"label":"Competition Title","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","required":true,"aliasIsDirty":true},{"alias":"competitionText","remove":false,"collapse":true,"label":"Competition Text","helpText":"","dataTypeGuid":"c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3","value":"","aliasIsDirty":true},{"alias":"competitionImage","remove":false,"collapse":true,"label":"Competition Image","helpText":"","dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59","value":"","aliasIsDirty":true},{"alias":"competitionLink","remove":false,"collapse":true,"label":"Competition Link","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","aliasIsDirty":true}],"aliasIsDirty":true,"$$hashKey":"1A8"}]}

(Data type 2)
image

Config model:
{"showAdvancedOptions":true,"startWithAddButton":true,"hideFieldsetToolbar":false,"enableMultipleFieldsets":false,"hideFieldsetControls":false,"hidePropertyLabel":false,"maxFieldsets":null,"enableCollapsing":true,"enableCloning":true,"enableDisabling":true,"enableDeepDatatypeRequests":false,"fieldsets":[{"alias":"article","remove":false,"collapse":false,"labelTemplate":"{{articleTitle}}","icon":"","label":"Article","properties":[{"alias":"articleTitle","remove":false,"collapse":true,"label":"Article Title","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","required":true,"aliasIsDirty":true},{"alias":"articleImage","remove":false,"collapse":true,"label":"Article Image","helpText":"","dataTypeGuid":"93929b9a-93a2-4e2a-b239-d99334440a59","value":"","aliasIsDirty":true},{"alias":"articleIntro","remove":false,"collapse":true,"label":"Article Intro","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","aliasIsDirty":true},{"alias":"articleText","remove":false,"collapse":true,"label":"Article Text","helpText":"","dataTypeGuid":"c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3","value":"","aliasIsDirty":true},{"alias":"link","remove":false,"collapse":true,"label":"Link","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"","aliasIsDirty":true},{"alias":"linkText","remove":false,"collapse":true,"label":"Link Text","helpText":"","dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae","value":"Click Here","aliasIsDirty":true}],"aliasIsDirty":true,"$$hashKey":"1GL"}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant