Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

ReferenceSearch excluding properties from being adjusted

Avatar

Level 1

Does anyone know how to exclude certain properties from being adjusted by the ReferenceSearch class when a parent page is moved. Is there a list of excluded properties that can be configured?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Ned Perry wrote...

If an author on the CQ author instance moves a page (renames it).

if a child page has a property referencing another child page of the page that has been moved or renamed then that reference is adjusted.

So e.g:

page1/

      page2

      page3 (with property legacyurl holding path to page2 e.g /page1/page2

Then if page1 is renamed to 'newpage' then page3.legacyurl = /newpage/page2

I want to stop this from happening the legacyurl property should remain /page1/page2

 


Why do you want to keep invalid location. Anyhow coming to original question it is not configurable.  As an alternative create a custom servlet for path /bin/wcm/references and give highest ranking.

View solution in original post

3 Replies

Avatar

Level 10

Can you please describe your use case in more detail.

Avatar

Level 1

If an author on the CQ author instance moves a page (renames it).

if a child page has a property referencing another child page of the page that has been moved or renamed then that reference is adjusted.

So e.g:

page1/

      page2

      page3 (with property legacyurl holding path to page2 e.g /page1/page2

Then if page1 is renamed to 'newpage' then page3.legacyurl = /newpage/page2

I want to stop this from happening the legacyurl property should remain /page1/page2

Avatar

Correct answer by
Level 10

Ned Perry wrote...

If an author on the CQ author instance moves a page (renames it).

if a child page has a property referencing another child page of the page that has been moved or renamed then that reference is adjusted.

So e.g:

page1/

      page2

      page3 (with property legacyurl holding path to page2 e.g /page1/page2

Then if page1 is renamed to 'newpage' then page3.legacyurl = /newpage/page2

I want to stop this from happening the legacyurl property should remain /page1/page2

 


Why do you want to keep invalid location. Anyhow coming to original question it is not configurable.  As an alternative create a custom servlet for path /bin/wcm/references and give highest ranking.