Grails

GSP precompilation resulting in an issue if a string has 2 or more (groovy) variables

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.2 final
  • Fix Version/s: 1.2.1
  • Component/s: View technologies
  • Labels:
    None
  • Environment:
    Windows Vista 32-bit SP2 / grails 1.2 Final / Java 1.6

Description

Putting this in any view

<meta name="SomeName" content='${grailsApplication.config.myFirstConfig}/something/${someVar}' />

results in :

at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
ava:450)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
... 15 more
Error executing script War: : org.codehaus.groovy.control.MultipleCompilationErr
orsException: startup failed, C:\Users----\.grails\1.2.0\projects\
gspComp\gspcompile\gsp_gspCompindex_gsp.groovy: 25: expecting ')', found '}' @ l
ine 25, column 88.
plication.config.myFirstConfig}/somethin

##

Here is how the code in generated gsp looks like

invokeTag('captureMeta','sitemesh',6,['content':(grailsApplication.config.myFirstConfig}/something/${someVar),'name':("SomeName")] as GroovyPageAttributes,null)

^

  1. gsp_gspCompindex_gsp.groovy
    24/Dec/09 8:02 PM
    3 kB
    Kapil Sachdeva
  2. index.gsp
    24/Dec/09 8:02 PM
    3 kB
    Kapil Sachdeva

Issue Links

Activity

Hide
Kapil Sachdeva added a comment -

I have find out that if you have

grails.views.gsp.sitemesh.preprocess = false

then the above mentioned issue does not occur.

Show
Kapil Sachdeva added a comment - I have find out that if you have grails.views.gsp.sitemesh.preprocess = false then the above mentioned issue does not occur.
Hide
Jeff Brown added a comment -

I am marking GRAILS-5605 as related to GRAILS-5598. They may actually be duplicates though I am not sure.

Show
Jeff Brown added a comment - I am marking GRAILS-5605 as related to GRAILS-5598. They may actually be duplicates though I am not sure.
Hide
Lari Hotari added a comment -
Show
Lari Hotari added a comment - Fixed in this commit (1.2.x branch): http://github.com/grails/grails/commit/ec8310829532819e270e7e3fd5bd4a7209434bf6
Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: