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

Not able to publish context aware configuration #3440

Open
3 tasks
mnshh opened this issue Sep 28, 2024 · 8 comments
Open
3 tasks

Not able to publish context aware configuration #3440

mnshh opened this issue Sep 28, 2024 · 8 comments
Assignees
Labels
need more info Issue requires more information

Comments

@mnshh
Copy link

mnshh commented Sep 28, 2024

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEMaaCS
  • ACS AEM Commons Version: 6.6.0
  • Reproducible on Latest? yes

Expected Behavior

Context aware configuration should be published and redirects added to it should work in Publish.

Actual Behavior

all redirects which are being added to /conf/global/settings/redirects is working fine in publish when published. Context aware configuration is not however.

logs:
2024/09/28 06:13:39:234 - INFO - Request accepted with distribution package PackageMessage(pubSlingId=a06abea1-ae79-4316-98b4-08daa75fe759, reqType=ADD, pkgId=dstrpck-1727504019153-aef3e5fe-7df8-45e8-a280-f3b12f6d5255, pkgType=journal_filevault, pkgLength=4672, pubAgentName=publish, userId=replication-service, paths=[/conf/xyz/settings/redirects], deepPaths=[], metadata={}) at offset=14648888, queueSize=1, queueSizeDelay=0
2024/09/28 06:13:50:793 - INFO - Successfully applied package with id dstrpck-1727504019153-aef3e5fe-7df8-45e8-a280-f3b12f6d5255, type ADD, paths [/conf/xyz/settings/redirects]

Steps to Reproduce

Open Redirect Manager --> Add redirects to context aware configuration (/conf/xyz) --> Change tab to Publish -> Publish

Links

Links to related assets, e.g. content packages containing test components

@YegorKozlov YegorKozlov self-assigned this Sep 28, 2024
@YegorKozlov
Copy link
Contributor

Did you add the cq:confproperty to your content tree and publish it? AEM performs a lookup based on the content and its contextual cq:conf property to find the appropriate configuration, e.g.

/content/xyz
    + jcr:content
      - cq:conf = "/conf/xyz"

/conf/xyz
    + settings
      + redirects
        + rule-1
            - source = "/content/xyz/page1"
            - target = "/content/xyz/page2"
            - statusCode = 302

@YegorKozlov YegorKozlov added the need more info Issue requires more information label Sep 28, 2024
@mnshh
Copy link
Author

mnshh commented Oct 1, 2024

Wait, So cq:conf property needs to be available at all pages and not just root page? Then i need to add it at Template?

@YegorKozlov
Copy link
Contributor

Wait, So cq:conf property needs to be available at all pages and not just root page? Then i need to add it at Template?

No, it needs to be on the root page only. Just make sure the root page is published.

I tested redirects in AEM CS 2024.6.16971.20240628T122619Z-240600 and 6.5.21 and all was working fine for me.

@mnshh
Copy link
Author

mnshh commented Oct 1, 2024

i manually added cq:conf property at a specific page(other than the root page) and then it works. my root page has it already.

@YegorKozlov
Copy link
Contributor

It could be something wrong with your content tree.
You only need cq:conf on the root page and that page needs to be published. CAconfig goes up the tree until this property is found.

You can use the "Sling / Context-Aware Configuration" plugin in the OSGi Console to test resolution and print the metadata.

image

@mnshh
Copy link
Author

mnshh commented Oct 1, 2024

I dont see any issue there. Everything looks fine as the metadata above.

@YegorKozlov
Copy link
Contributor

are you checking on the publish instance?

@mnshh
Copy link
Author

mnshh commented Oct 2, 2024

In my local it works when i created a new replication agent. I am facing this issue in AEM Cloud. I have the same content hierarchy. I could also see that sling distribution logs as mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Issue requires more information
Projects
None yet
Development

No branches or pull requests

2 participants