Issue with data-sly-set | Adobe Higher Education
Skip to main content
Level 3
May 16, 2023
Beantwoord

Issue with data-sly-set

  • May 16, 2023
  • 4 reacties
  • 2576 Bekeken

When I use data-sly-set to store an intermediate variable, It is throwing the error while compiling in Intellij

 

data-sly-set: None of the registered plugins can handle the data-sly-set block element.

 

However, the same is working, If I use it directly in the crxde.

 

What could be the reason? any thoughts ?

Er kunnen geen reacties meer worden geplaatst op dit onderwerp.
Beste antwoord door somen-sarkar

Hi,

What is the version of "htl-maven-plugin" in your pom file?  It may be an older version which is causing the compilation error. You can check with the latest plugin version .

 

Thanks,

Somen

4 reacties

somen-sarkar
Community Advisor
somen-sarkarCommunity AdvisorAntwoord
Community Advisor
May 16, 2023

Hi,

What is the version of "htl-maven-plugin" in your pom file?  It may be an older version which is causing the compilation error. You can check with the latest plugin version .

 

Thanks,

Somen

Shiv_Prakash_Patel
Community Advisor
Community Advisor
May 16, 2023

Hi @sateeshkreddy ,

It occurs due to an older version of the htl-maven-plugin, as suggested by @somen-sarkar . You can upgrade to the latest version, 2.0.4-1.4.0.

https://mvnrepository.com/artifact/org.apache.sling/htl-maven-plugin

You can also check the same thread here - https://stackoverflow.com/questions/60458294/unable-to-create-maven-package-for-aem-due-to-use-of-data-sly-set

Regards,

Shiv

 

Shiv Prakash
BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 16, 2023

You need to make sure you have the correct AEM version & service pack installed. The data-sly-set is available for Version 1.4 sightly compiler installed.

 

An implementation of version 1.4 of the language specification is available in AEM 6.3 SP3+, AEM 6.4 SP1+, and AEM 6.5+.

 

If you have access to system/console, you can find out which version you have ->
What Version Sightly, Apache Sling Scripting HTL Engine, is my AEM Using? - Sourced Code

 

MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 16, 2023

Hi @sateeshkreddy ,

 

The error message you are encountering in IntelliJ IDE, because of the IDE's HTML or Sling plugin may not support the data-sly-set attribute syntax. This is a limitation of the IDE's static analysis capabilities.

 

However, please note that the data-sly-set attribute is a valid and commonly used attribute in AEM's HTL templating language. Even though IntelliJ is reporting an error, the code should still compile and work correctly within AEM CRXDE or when deployed to an AEM instance.

 

To work around the IDE error, you can either ignore the error in the IDE or disable the static analysis feature for HTL/Sightly code.It's important to note that the error reported by the IDE is related to the IDE's support for HTL/Sightly and not a fundamental issue with your code or its functionality within AEM.