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 ?
Solved! Go to Solution.
Views
Replies
Total Likes
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
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
Hi @sateeshreddy ,
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-da...
Regards,
Shiv
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+.
Hi @sateeshreddy ,
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.
Views
Likes
Replies