Grails
  1. Grails
  2. GRAILS-7915

GSP compilation apparently broken in build #1229

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-M2
    • Fix Version/s: 2.0-RC1
    • Component/s: None
    • Labels:
    • Environment:
      Grails 2.0.0-BUILD-SNAPSHOT

      Description

      With the grails_core_2.0.x build #1229 (16.08.2011 05:23:30) the following error occurs upon running "grails prod war":

      Compiling 171 source files
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      Note: Some input files use unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      Compiling 46 source files
      Compiling 46 source files.
      [from println in Config.groovy] Catalina Base: .
      [from println in Config.groovy] Environment: PRODUCTION
      Compiling 46 source files.....
      DEBUG: setDebug: JavaMail version 1.4.3
      [from println in Config.groovy] Catalina Base: .
      [from println in Config.groovy] Environment: PRODUCTION
      Compiling 55 GSP files for package [myproj].
      Error GSP Compilation error in file /WEB-INF/grails-app/views/layouts/_piwik.gsp at line 18: Unclosed GSP expression

      The GSP in question:

      <g:if env="production">
      <g:set var="piwikSiteId" value="7" />
      </g:if>
      <g:elseif env="development">
      <g:set var="piwikSiteId" value="8" />
      </g:elseif>
      <g:else>
      <g:set var="piwikSiteId" value="0" />
      </g:else>

      <script type="text/javascript">
      var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.example.org/" : "http://piwik.example.org/");
      document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
      </script><script type="text/javascript">
      try {
      var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", $

      {piwikSiteId});

      <%-- If this is a 404 page, provide additional information to Piwik --%>
      <g:if test="${'static' == controllerName && 'notFound' == actionName}">
      piwikTracker.setDocumentTitle('404/URL = '+String(document.location.pathname+document.location.search).replace(/\//g,"%2f") + '/From = ' + String(document.referrer).replace(/\//g,"%2f"));
      </g:if>

      piwikTracker.trackPageView();
      piwikTracker.enableLinkTracking();
      } catch( err ) {}
      </script>
      <noscript><img src="http://piwik.example.org/piwik.php?idsite=${piwikSiteId}

      " alt="" /></noscript>

      Note that line #18 in the source is the comment, but even if it is removed the error persists at line 18. Maybe the line number is from the resulting compiled GSP

      I hope this info is useful for further development.

        Issue Links

          Activity

          Hide
          Jeff Scott Brown added a comment -

          Note that there is relevant test code in GroovyPagesTemplateEngineTests.testParsingNestedCurlyBraces() which is currently passing only because it uses notYetImplemented().

          Show
          Jeff Scott Brown added a comment - Note that there is relevant test code in GroovyPagesTemplateEngineTests.testParsingNestedCurlyBraces() which is currently passing only because it uses notYetImplemented().
          Hide
          Lari Hotari added a comment -

          Looks like there are still some problems in GSP compilation: http://grails.1312388.n4.nabble.com/render-tag-tp3805650p3805650.html . I'll reopen this issue.

          Show
          Lari Hotari added a comment - Looks like there are still some problems in GSP compilation: http://grails.1312388.n4.nabble.com/render-tag-tp3805650p3805650.html . I'll reopen this issue.
          Show
          Lari Hotari added a comment - Another problem: http://grails.1312388.n4.nabble.com/Attribute-value-must-be-quoted-tp3804756p3804756.html

            People

            • Assignee:
              Lari Hotari
              Reporter:
              Bernhard Areich
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development