Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Content fragment show error on dropdown

Avatar

Level 2

Hi,

 

I am getting error message on dropdown in content fragments. Its required filed and when open any content fragment its show an error even option is selected. I have checked on AEM-SP-6.5.8, SP-6.5.10 and SP-6.5.12 this error shown on these service packs of AEM. Its required field and I can't change it. Please suggest me solution.

 

content fragment model-

N_haq_0-1649338302449.png

 

Content fragment below-

N_haq_1-1649338352979.png

 

Below Region data saved on crx/content.. for this content fragment.

N_haq_2-1649338420640.png

 

 

 

 

Is there any way that error message don't come when option selected?

 

 

Thanks in advance!

 

@arunpatidar 

@smacdonald2008 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @N_haq,

SP10 for AEM 6.5 provides massive extension/change of Content Fragment functionality, you can find the details under SP10 release notes https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/service-pack/6.5.10.html....

In general the way how list of options is stored in Enumeration component has changed. In the version before SP10 options was kept as a comma separated string, and on the repository level it was inside single property.

legacy-cf-enum-gui.jpglegacy-cf-enum-crx.jpg

Starting from AEM 6.5.10, Enumeration component use list of pairs (key, value) to represent options that will be available in the drop-down. On the repository level options are store as individual child nodes of optionsmultifield node.

new-cf-enum-gui.jpgnew-cf-enum-root.jpgnew-cf-enum-structure.jpg

Solution

To fix the issue you need to reorganize your current comma separated options list into hierarchical structure that base on key/value approach. Once you do this, you will not see an error any more. Currently error is shown because there is information about value from specific content fragment that could not be matched with value from content fragment model. Items from comma separated list are interpreted as labels.

Follow below steps:

  1. Create optionsmultifield under region node that is part of content fragment model.
  2. Under optionsmultifield create single node for each option you have, I think you can use the same value for fieldLabel and fieldValue this should assure that you'll not need to do any changes in existing content fragments.
  3. Finally you will need to remove options property from region node - it will not be needed any more, if you will leave it,the error will still appear.

It is highly possible that you would be able to do above changes (except removing options property), directly from Content Model editor GUI - this could be faster.

Last but not least - I am not aware about any backward compatibility mode, or automated mechanism that could do the job, so I believe that manual change is the only way to go.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @N_haq,

SP10 for AEM 6.5 provides massive extension/change of Content Fragment functionality, you can find the details under SP10 release notes https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/service-pack/6.5.10.html....

In general the way how list of options is stored in Enumeration component has changed. In the version before SP10 options was kept as a comma separated string, and on the repository level it was inside single property.

legacy-cf-enum-gui.jpglegacy-cf-enum-crx.jpg

Starting from AEM 6.5.10, Enumeration component use list of pairs (key, value) to represent options that will be available in the drop-down. On the repository level options are store as individual child nodes of optionsmultifield node.

new-cf-enum-gui.jpgnew-cf-enum-root.jpgnew-cf-enum-structure.jpg

Solution

To fix the issue you need to reorganize your current comma separated options list into hierarchical structure that base on key/value approach. Once you do this, you will not see an error any more. Currently error is shown because there is information about value from specific content fragment that could not be matched with value from content fragment model. Items from comma separated list are interpreted as labels.

Follow below steps:

  1. Create optionsmultifield under region node that is part of content fragment model.
  2. Under optionsmultifield create single node for each option you have, I think you can use the same value for fieldLabel and fieldValue this should assure that you'll not need to do any changes in existing content fragments.
  3. Finally you will need to remove options property from region node - it will not be needed any more, if you will leave it,the error will still appear.

It is highly possible that you would be able to do above changes (except removing options property), directly from Content Model editor GUI - this could be faster.

Last but not least - I am not aware about any backward compatibility mode, or automated mechanism that could do the job, so I believe that manual change is the only way to go.

Avatar

Level 2

Hi @lukasz-m 

 

I did this way to create content fragment model and checked on content fragments but still this error not fixed. There is no any backend or other mechanism.

Is there any script that can overlay to fix this?

Avatar

Level 3

Hey @N_haq ,

I am facing the same issue. Were you able to resolve this ?

Avatar

Level 3

Hello @N_haq ,

This issue has been reported and fixed in 6.5.14. I tried to upgrade my sp and it is working fine now.