Expand my Community achievements bar.

(Unnecessary) Sightly warn level messages in SP21

Avatar

Level 2

Hello.  We're in the process of moving to SP21.  While testing our pages with the new service pack, I noticed some Warn level messages in the error.log file added by the HTL compiler.  Out of curiosity, I searched for similar messages in a clean SP21 instance, no custom code, and the message also shows when loading We Retail pages:

09.07.2024 14:41:38.064 *WARN* [127.0.0.1 [1720550498039] GET /content/we-retail/language-masters/en/men.html HTTP/1.1] org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler Script /libs/wcm/foundation/components/responsivegrid/responsivegrid.html 27:29: ${child.resource @ decoration='true', cssClassName=child.cssClass}: Unknown option 'cssClassName'.
09.07.2024 14:41:38.064 *WARN* [127.0.0.1 [1720550498039] GET /content/we-retail/language-masters/en/men.html HTTP/1.1] org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler Script /libs/wcm/foundation/components/responsivegrid/responsivegrid.html 27:29: ${child.resource @ decoration='true', cssClassName=child.cssClass}: Unknown option 'decoration'.

 

When loading our same pages on an SP19 instance, the error.log file does not contain any of these messages.

 

It's not a blocker, the pages are loading fine, but these messages are unnecessarily polluting our log files.

 

The Apache Sling Scripting HTL Engine bundle, which contains the class that's adding the log entries, did change from version 1.1.2.1_4_0 in SP19 to 1.2.6.140 in SP21.

 

Has anyone else seen log entries as these in Cloud Service SDK's? Is there any way to prevent them from showing in the logs?

 

Thanks in advance.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Community Advisor

You can check the htl-maven-plugin configuration. You can configure the allowedExpressionOptions
Adjusting it might fix the issue.

 

<plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>htl-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>validate-htl-scripts</id>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                        <phase>compile</phase>
                        <configuration>
                            <generateJavaClasses>true</generateJavaClasses>
                            <generatedJavaClassesPrefix>org.apache.sling.scripting.sightly</generatedJavaClassesPrefix>
                            <allowedExpressionOptions>
                                <allowedExpressionOption>cssClassName</allowedExpressionOption>
                                <allowedExpressionOption>decoration</allowedExpressionOption>
                                <allowedExpressionOption>decorationTagName</allowedExpressionOption>
                                <allowedExpressionOption>wcmmode</allowedExpressionOption>
                            </allowedExpressionOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

 

Avatar

Level 2

Hi h_kataria,

 

Thanks for your response.  We do have the htl-maven-plugin and its configurations in place on our ui.apps pom.xml file.  There is a slight difference in ours from your suggestion, though: the "phase" value is set to 'generate-sources' instead of 'compile' (we've had this value since the project setup, it's what a project generated with Archetype 49 contains, plus the Sling htl-mvn-plugin doc usage page - https://sling.apache.org/components/htl-maven-plugin/usage.html - also contains 'generate-sources').

 

Either way, with 'compile' or 'generate-sources', I'm still seeing the log messages.

 

One thing I forgot to mention is, in the parent pom.xml file, I'd changed the version from '1.3.4-1.4.0' to '2.0.2-1.4.0', the version from Archetype 49.  The Sling doc page mentions version '2.0.4-1.4.0'.  There are no log messages with 1.3.4-1.4.0.  Guess I'll stick with the old version to avoid the messages.