Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

INherited Page Properties returning incorrect values

Avatar

Level 6

I have a root page say en, en has property cancelInsta checkbox checked and i have page en/index on this page the value of the checkbox returning is true and i have another page en/profession/product on this page the value is returning false. 

The vinheritedpageproperties value is returning different on different pages any help on this.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Have you verified the properties on the jcr:content of the page and parents' in it's hierarchy?

Alternatively, If you try to open page properties dialog of the the newly created page and submit without doing any modifications, Do you still see it returning the value true?

View solution in original post

7 Replies

Avatar

Community Advisor

Hi @Keerthi0555 ,

I will explain the working mechanism for inharitedPageProperties, whatever the property name you are looking for, it will start looking the property from the immediate parent, if not found then parent's parent and so on, so in this hierarchical call it will pick the first occurrence and return the value so probable solution to your problem will be check the property in the page hierarchy if it available somewhere other than the root page, delete those it should be working.

Hope this helps

Umesh Thakur    

Avatar

Level 6

Hi,

 

I have it the property on root page level only not on page level.

Avatar

Community Advisor

Hi @Keerthi0555 - Have you already verified that the property "cancelInsta" value has not been over ridden at current page or immediate parent page level?

I would start by comparing the values directly on jcr:content nodes of en/profession/product and en/profession to see if cancelInsta property exists. It's quite possible that the checkbox value of False might have got submitted inadvertently, while updating other properties on the dialog and submitting it.

Either way, let us know what you see!

 

- Fani

Avatar

Level 6

yes the cancelInsta property is there only at root level  page not at page level. I created new page that page under root for that page also it's returning correct value but not for en/profession/product .

Avatar

Correct answer by
Community Advisor

Have you verified the properties on the jcr:content of the page and parents' in it's hierarchy?

Alternatively, If you try to open page properties dialog of the the newly created page and submit without doing any modifications, Do you still see it returning the value true?

Avatar

Community Advisor

The "uncheckedValue" property on your checkbox field might be causing the value to be set as "false", when you inadvertently submit the dialogs on other pages. You can either remove this property or run your logic around "true" value of the field.

Avatar

Community Advisor

@Keerthi0555 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.