Expand my Community achievements bar.

Unable to build the blueprint template

Avatar

Level 3

When I try to build the blueprint template, I get the following error. I have included the msm folder under apps and have also added the path in filter.xml. Am I missing something?

 

template-error.PNG

18 Replies

Avatar

Level 10

Hello @sethia_varsha - 

 

Looking at the console error which you have attached above, It seems : 

  • That while creating the MSM blueprint you were trying to add the cq:dialog node as a child of the the parent node nt:folder which is not permissible.
  • However, if you would try creating a cq:dialog node under a nt:folder from CRXDE it would give a warning and not let you create a cq:dialog node under a nt:folder. 

 

Please validate the MSM folder structure under apps.

Please try to create Blueprint from the sites console : 

 

Tanika02_0-1682313558994.png

 

Thanks,

Tanika

Avatar

Level 3

Hi Tanika, 

 

I have created the blueprint using the sites console. It is also working as expected. I am getting the above console error when I am deploying this template to higher environments.

Avatar

Level 10

Hello @sethia_varsha - 

 

But I see the code build is failed.

Because as I mentioned it seems : 

  • That while creating the MSM blueprint you were trying to add the cq:dialog node as a child of the the parent node nt:folder which is not permissible.
  • However, if you would try creating a cq:dialog node under a nt:folder from CRXDE it would give a warning and not let you create a cq:dialog node under a nt:folder. 

Can you share the .xml (content/dialog) from the ui.apps folder for the MSM blueprint that you might have added in your codebase.

Avatar

Level 3

Hi @Tanika02,

Here is the xml content of the template:

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:lastModified="{Date}2023-04-21T12:59:05.071+05:30"
cq:lastModifiedBy="admin"
cq:template="/libs/wcm/msm/templates/blueprint"
jcr:primaryType="nt:unstructured"
jcr:title="CBDT Blueprint"
sling:resourceType="wcm/msm/components/blueprint"
sitePath="/content/cbdt/language-masters">
<dialog/>
</jcr:content>
</jcr:root>

Avatar

Level 10

@sethia_varsha  - This looks correct!

 

I created a MSM blueprint on the vanilla instance and tried to deploying as well.

It worked as expected!

 

But quick question you mentioned above that you are getting the above console error when you are deploying the code to higher environments.

 

What happened when you did a local build was it successful? 

Avatar

Level 10

@sethia_varsha - Even when  you have the above content.xml are you still getting the above error?

Avatar

Level 3

Yes @Tanika02, I think it is not being able to fetch the jcr:content properties from the above blueprint xml and that's why it's considering the jcr:content node to be of the type nt:folder

Avatar

Level 10

@sethia_varsha-  If you can validate the existence of the content.xml across msm folder, the custom blueprint folder (that you have created above) and across the jcr:content folder within the apps folder in your code repository alongside updating the filter.xml file.

 

If not, the content.xml should be atleast present across the jcr:content folder (as in case of WKND sites)

 

I think that should be solving the problem. As I am able to successfully deploy code to servers.

Avatar

Level 3

Hi @Tanika02,

Updating the version of 'filevault-package-maven-plugin' in pom resolved the issue.

pom-snap.PNG

Thanks for your help

Avatar

Employee Advisor

Hi @sethia_varsha ,

 

As per your screenshot , you are creating cbdt-blueprint as nt-folder, it needs to be jcr:primaryType="nt:unstructured".

 

Please update the same and then it should work.

 

Thanks

Bimmi Soi

Avatar

Level 3

Hi @Bimmi_Soi,

Updating the version of 'filevault-package-maven-plugin' in pom resolved the issue. Thanks for your help

 

 

Avatar

Level 3

Hi @Bimmi_Soi ,

 

I have created the node as jcr:primaryType="nt:unstructured". But when I create a package for it and try building, then it takes the folder type as nt:folder. Also manually adding the .content xml file with jcr:primaryType="sling:Folder" is resolving the issue. But I see that in wknd site it works without the xml file, therefore it should work in my case too but somehow, it's not being able to take the correct file type.

crx-snap.PNGfolder-snap.PNG

Avatar

Employee Advisor

Could you please paste here whats in the content.xml  of cbdt-blueprint?

Avatar

Level 3

Hi @Bimmi_Soi,

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:lastModified="{Date}2023-04-21T12:59:05.071+05:30"
cq:lastModifiedBy="admin"
cq:template="/libs/wcm/msm/templates/blueprint"
jcr:primaryType="nt:unstructured"
jcr:title="CBDT Blueprint"
sling:resourceType="wcm/msm/components/blueprint"
sitePath="/content/cbdt/language-masters">
<dialog/>
</jcr:content>
</jcr:root>

Avatar

Employee Advisor

And I believe the filter.xml has 

<filter root="/apps/msm/cbdt-blueprint" mode="merge"/>

Avatar

Level 2

The following version of plugin should resolve the issue

 

 <groupId>org.apache.jackrabbit</groupId>
                    <artifactId>filevault-package-maven-plugin</artifactId>
                    <extensions>true</extensions>
                    <version>1.3.4</version>