Jetspeed 2
  1. Jetspeed 2
  2. JS2-1114

[velocity] Null reference [template 'decorations/layout/jetspeed/header.vm', line 49, column 17] :${layoutFragment.id} cannot be resolved

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.1.4, 2.2.0
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Decorations/Themes
    • Labels:
      None
    • Environment:
      Apache 2.2 + mod_jk + jboss4.0.5 + oracle10g + windows

      Description

      When I start my portal or a binary distribution of JetSpeed 2.2.0, in the logs, appears a trace that reads as follows:

      2010-02-25 18:54:14,033 INFO [velocity] Null reference [template 'decorations/layout/jetspeed/header.vm', line 49, column 17] :$

      {layoutFragment.id} cannot be resolved.

      This not produce effects, but is ugly.

      This line is in header.vm.
      #defineLayoutObjects()
      .
      .
      <div id="layout-${layoutFragment.id}

      " class="#PageBaseCSSClass()" >

      This variable (layoutFragment) is not initialized, and I thought must be:

      <div id="layout-$

      {rootFragment.id}

      " class="#PageBaseCSSClass()" >

      Because rootFragment is the variable initialized in the jetspeed_macros.vm

      #macro (defineLayoutObjects)
      #set($preferedLocale = $JS2RequestContext.locale)
      #set($rootFragment = $jetspeed.currentFragment)
      #set($site =$request.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext"))
      #set($theme = $request.getAttribute("org.apache.jetspeed.theme"))
      #set($layoutDecoration = $theme.getDecoration($rootFragment))
      #end

      Regards
      Francisco Rosado

      1. header.vm
        3 kB
        Francisco Javier Rosado

        Activity

        Hide
        Francisco Javier Rosado added a comment -

        This is the file thast contains the modification. I don't knwo if this is the correct modification, but works...

        Show
        Francisco Javier Rosado added a comment - This is the file thast contains the modification. I don't knwo if this is the correct modification, but works...
        Hide
        Ate Douma added a comment -

        Hi Francisco,

        Nice catch, even if this is only a minor issue
        This actually is a "bug" affecting even the 2.1.3 release (and probably versions before that).

        Your provided fix is correct and I've committed this to the 2.1.3-postrelease and 2.1.4 branches and 2.2.1 trunk.

        Thanks for the report.

        Show
        Ate Douma added a comment - Hi Francisco, Nice catch, even if this is only a minor issue This actually is a "bug" affecting even the 2.1.3 release (and probably versions before that). Your provided fix is correct and I've committed this to the 2.1.3-postrelease and 2.1.4 branches and 2.2.1 trunk. Thanks for the report.

          People

          • Assignee:
            Ate Douma
            Reporter:
            Francisco Javier Rosado
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development