Skip to main content
donquixote_dofl
Level 2
May 22, 2026
Question

How to resolve Content Area Violation

  • May 22, 2026
  • 1 reply
  • 27 views

I have ran Best Practice Analyzer and found Content Area Violation on some of the shared fields across the project.

The path: /apps/project-1/component/granite/ui/components/coral/color-picker/variations/
violates content areas override final path: /libs/granite/ui/components/foundation/form/select

 and the content.xml for the component  is having as below
 

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

    jcr:primaryType="sling:Folder"

    sling:resourceSuperType="granite/ui/components/foundation/form/select"/>

 

How to resolve this Content Area Violation?

1 reply

avesh_narang
Level 4
May 22, 2026

Hi ​@donquixote_dofl 

Please bring you commponent out of granite path that is instead of 

/apps/project-1/component/granite/ui/components/coral/color-picker/variations

Change to :

/apps/project-1/components/color-picker/variations

Then keep it as is :

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

jcr:primaryType="sling:Folder"

sling:resourceSuperType="granite/ui/components/foundation/form/select"/>

This should resolves the content area violation and keep the customization clean as well .

Also additionally it would be great, if you can update this to Coral 3 version:

sling:resourceSuperType="granite/ui/components/coral/foundation/form/select"

Thanks 

donquixote_dofl
Level 2
May 22, 2026

tried changing the path out of granite still flagged as CAV issue

avesh_narang
Level 4
May 22, 2026

@donquixote_dofl  please ensure , No path contains granite/ui/components in /apps and also 

jcr:primaryType = nt:unstructured

in content.xml.