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

Add back jcr:content definition to avoid the folder being created as nt:folder #1021

Merged
merged 5 commits into from Jan 13, 2023

Conversation

vladbailescu
Copy link
Member

The definition was removed as part of #647

Fixes #997

Copy link
Contributor

@kwin kwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vladbailescu
Copy link
Member Author

Getting validation errors during build:

2023-01-11T15:21:22.6829715Z [INFO] [ERROR] ValidationViolation: "jackrabbit-filter: Node '/content/dam/testing-frontend-general/jcr:content' is not contained in any of the filter rules", filePath=jcr_root/content/dam/testing-frontend-general/.content.xml, nodePath=/content/dam/testing-frontend-general/jcr:content, line=7, column=51
2023-01-11T15:21:22.6831512Z [INFO] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'jcr:title' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/content/dam/testing-frontend-general/.content.xml, nodePath=/content/dam/testing-frontend-general/jcr:content, line=7, column=51
2023-01-11T15:21:22.6833274Z [INFO] [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'cq:conf' [String] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type!", filePath=jcr_root/content/dam/testing-frontend-general/.content.xml, nodePath=/content/dam/testing-frontend-general/jcr:content, line=7, column=51

@@ -49,6 +49,7 @@

<!-- DAM folder root, will be created via repoinit -->
<filter><root>/content/dam/${appId}</root></filter>
<filter><root>/content/dam/${appId}/jcr:content</root></filter>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This additional filter is redundant. Are you sure this is effective at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, you're right, it's absolutely useless 🤦

Since you added the new MERGE_PROPERTIES mode in https://issues.apache.org/jira/browse/JCRVLT-255 I think we can use that.

The whole idea was to avoid having a broad filter on the /content/dam/${appId} node as it was causing issues during deployments on Cloud Service.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MERGE_PROPERTIES will never be supported in AEM 6.5 as it uses an ancient FileVault version, even AEM Cloud is not yet on a new FileVault release (but that should happen soon).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could add the /content/dam/${appId} filter and jcr:content node definition only for 6.5 projects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather work with includes/excludes there.

@krystian-panek-wttech
Copy link

krystian-panek-wttech commented Feb 6, 2023

thanks @vladbailescu ! I will test it empirically soon ;)

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

Successfully merging this pull request may close these issues.

AEM instance repository getting corrupted after archetype 39 code deployment
4 participants