stefankendall/gsp-resources — Issue #2: Plugin breaks g:link tags
Author: bostanio
Created: 2012-01-15 16:29:08+00:00
State: open

For me this plugin mostly doesn't work as it fundamentally breaks g:link tags.

To reproduce
1. create a new grails app.
2. add the gsp-resource plugin in BuildConfig.groovy
3. add a gsp resource to ApplicationResources.groovy (the sample style one is fine)
4. put a g:link tag in the main page of the app (something like: Index Link
5. run the app and navigate to the index page

I get this error:

Caused by MissingMethodException: No signature of method: org.codehaus.groovy.grails.web.mapping.CachingLinkGenerator.link() is applicable for argument types: (org.codehaus.groovy.grails.web.taglib.GroovyPageAttributes, groovy.lang.ExpandoMetaClass$ExpandoMetaProperty) values: [[uri:/index, params:[execution:groovy.lang.ExpandoMetaClass$ExpandoMetaProperty@44822268]], ...]

From digging through the stack trace it looks like something about rendering the gsp resources has the effect of converting the request object to an ExpandoMetaClass and hence the missingMethodException.