[nt:unstructured] is not allowed under [nt:folder] error | Community
Skip to main content
July 6, 2020
Solved

[nt:unstructured] is not allowed under [nt:folder] error

  • July 6, 2020
  • 3 replies
  • 4615 views

Hi,

 

We are trying to import a package from our live environment into a local machine, and we are receiving a [nt:unstructured] is not allowed under [nt:folder] error. We are not doing any migration, but only importing this package. We are also receiving this error when trying to build a package on the local machine.

 

Does anyone know why this error might occur?

 

Regards,

Sri

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Shashi_Mulugu

@srikoll it could be because of the mismatch of node types in production and local instance.

 

For /content/a/b/c structure you might have already have part of your structure (ex:/content/a) in local and aem trying to create the rest.

 

If possible either delete the whole structure and import the package or compare the high level node types between production and local, modify it accordingly 

3 replies

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
July 6, 2020

@srikoll it could be because of the mismatch of node types in production and local instance.

 

For /content/a/b/c structure you might have already have part of your structure (ex:/content/a) in local and aem trying to create the rest.

 

If possible either delete the whole structure and import the package or compare the high level node types between production and local, modify it accordingly 

July 6, 2020

Hi, after deleting the packages, and importing/reinstalling, we get the same error. Two questions related to your answer:

  1. Is there a way to compare structures to verify if this is the issue?
  2. When you say delete the current structure, how can i verify that I have done this?

Thank you

Vaibhavi_J
July 6, 2020

Hi @srikoll 

 

Like @shashi_mulugu  suggested it must be an node mismatch issue between local and production. 

Upload the package on fresh instance/delete the mismatched node, you should not be seeing above error. Also use force upload option when you are uploading the package. 

 

vanegi
Adobe Employee
Adobe Employee
July 6, 2020

Please note that:

A nt:unstructured node CANNOT be created under the type ‘nt:folder’. You can try it, it’s not gonna save the changes ! But it can be created under folder.

 

I tried a quick test by creating a node of type nt:unstructured under nt:folder but ended up getting the above exception.

 

You can deploy your codebase to a new instance. By deploying to a new instance, these exceptions can be avoided. When you deploy the packages, please delete the old structure.