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

Text component removing Inline styles

Avatar

Level 5

This issue only occurs in AEM SDK v2023.1.10675.  I have confirmed that it does not occur in any 2022 release.  This issue is confirmed on both cloud managed environments as well as with the quickstart JAR.

 

When using the Text Component, I am settings some text to be aligned in the center.  When I view the raw HTML, I see this:

 

<h2 style="text-align: center;">Hello World</h2>

 

However, when saving this change the text does not get aligned to the center. When I re-open the RTE and check, it is simply this:

 

<h2>Hello World</h2>

 

Additionally, when viewing the published page, I see this markup for the text component:

 

<div data-cmp-data-layer="{&quot;text-afd76d34d8&quot;:{&quot;@type&quot;:&quot;microsoftgamedev/components/text&quot;,&quot;repo:modifyDate&quot;:&quot;2023-01-19T14:07:59Z&quot;,&quot;xdm:text&quot;:&quot;<h2 style=\&quot;text-align: center;\&quot;>Hello World</h2>\r\n&quot;}}" id="text-afd76d34d8" class="cmp-text">
<h2 style="">Hello World</h2>

</div>

 

Just based on what I see in data-cmp-data-layer, it appears to be persisted correctly. I can also see it persisted correctly in the JCR...

 

Question:

  • At rendering time the inline styling for text-align: center is being stripped out. What would cause this behavior and where can I look to resolve it? 
  • Is there any way to downgrade versions from the cloud manager console perhaps?

 

Additional Observations:

  • This did not occur until upgrading to the 2023.01 release.
  • I am also noticing that all CMS operations now have a ~5-10 second lag- from saving, to opening dialogs, to adding components... it all lags where it didn't before this version.
  • Other inline styles, such as "color: red" do not get stripped.  Only text align is getting stripped from what I can tell.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @dylanmccurry 

 

This is a known issue with AEM's latest release and it's something we can replicate on AEM SDK as well. Please raise a request with Adobe Support and ask them to roll back to the previous stable version which is 2022.11.9850.20221116T162329Z. I have faced the same issue and we were able to resolve it, by roll back.

 

Thanks,

Asutosh

View solution in original post

4 Replies

Avatar

Community Advisor

Hey, I observed this issue earlier, back then the difference was due to core-components version on the POM file. Can you check the core-components version on the POM file?

Avatar

Level 5

I just upgraded to 2.21.2 and the issue still occurs locally with the cloud quickstart jar.

Avatar

Community Advisor

yeah, it appears on local because of the difference in the SDK version to your higher environments, as @Asutosh_Jena_  mentioned seems like this is a known issue.

I would suggest making use of span tags with inline styling to align the content and check or make use of CSS.

Thanks,
Sravan 

Avatar

Correct answer by
Community Advisor

Hi @dylanmccurry 

 

This is a known issue with AEM's latest release and it's something we can replicate on AEM SDK as well. Please raise a request with Adobe Support and ask them to roll back to the previous stable version which is 2022.11.9850.20221116T162329Z. I have faced the same issue and we were able to resolve it, by roll back.

 

Thanks,

Asutosh