Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-9625

Velocity error when default confluence css is uses in themes

      The following error is thrown when trying to use the default confluence style in a theme as defined below:

      <theme key="hostedtheme" i18n-name-key="com.atlassian.confluence.extra.hosted.theme.name" name="Hosted Theme" class="com.atlassian.confluence.themes.BasicTheme">
      ...
      <param name="includeClassicStyles" value="false"/>
      <resource type="stylesheet" name="confluence.css" location="/templates/hosted/theme/confluence.css" />
      </theme>

      The cause for the errors appears to be the following part from the css:

      form#quickSearch

      { margin: 2px; padding: 0; }

      form#quickSearch input

      { font-size: 10pt; vertical-align: middle; }

      If you remove or rename qickSearch, the error disappears.

      ERROR:
      ------------------------
      Sep 30, 2007 12:45:43 AM org.apache.catalina.storeconfig.StoreLoader load
      INFO: Find registry server-registry.xml at classpath resource
      Sep 30, 2007 12:45:43 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 47064 ms
      2007-09-30 00:45:55,271 ERROR [http-8080-Processor25] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/styles/combined-css.vm'
      – action: main-action
      org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 3229, column 17. Encountered: "{" (123), after : ""
      at org.apache.velocity.Template.process(Template.java:181)
      at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466)
      at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
      at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
      at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
      at org.apache.velocity.Template.merge(Template.java:296)
      at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91)
      at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116)
      at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47)

            [CONFSERVER-9625] Velocity error when default confluence css is uses in themes

            I changed the documentation and easy reader themes to use the default theme styles and I was unable to reproduce the problem. I'm closing this as fixed.

            Brian Nguyen (Inactive) added a comment - I changed the documentation and easy reader themes to use the default theme styles and I was unable to reproduce the problem. I'm closing this as fixed.

            Matt Ryall added a comment -

            Hang on, if you nominate not to include the default stylesheet (as you do above), you shouldn't get any errors from the Confluence stylesheets, because they shouldn't be included.

            Matt Ryall added a comment - Hang on, if you nominate not to include the default stylesheet (as you do above), you shouldn't get any errors from the Confluence stylesheets, because they shouldn't be included.

            Strange. These hashes are already escaped in Velocity.

            Are you using 2.6.0 final?

            Matt Ryall added a comment - Strange. These hashes are already escaped in Velocity. Are you using 2.6.0 final?

            jens added a comment -

            Most likely related to the following macro in macros.vm:

            #quickSearch()

            jens added a comment - Most likely related to the following macro in macros.vm: #quickSearch()

              bnguyen Brian Nguyen (Inactive)
              jens@atlassian.com jens
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: