Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin breaks g:link tags #2

Open
jonspalmer opened this issue Jan 15, 2012 · 6 comments
Open

Plugin breaks g:link tags #2

jonspalmer opened this issue Jan 15, 2012 · 6 comments

Comments

@jonspalmer
Copy link

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: <g:link url="/">Index Link/g: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.

@djbriane
Copy link

I'm using ${resource(dir:'images/', file: 'favicon.ico')} to load images and ran into the same issue once I added this code.

@simoncomley
Copy link

Yip, same issue here

@traneHead
Copy link

+1 (using g:formRemote, grails 2.0.1 and resources-1.1.6)

@mckenfra
Copy link
Collaborator

I've developed a fix for this - been trying to get hold of Stefan by email, but no response yet.

@jonspalmer
Copy link
Author

why not just submit the pull request?

@mckenfra
Copy link
Collaborator

Hi - Stefan's happy to pass over ownership of the plugin to me, as he's moved onto other projects. I've forked the repo and uploaded the new code - now just waiting to get my grails account setup so I can publish it. Hopefully shouldn't take too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants