Details
Description
I'm not sure if this is a bug or some kind of restriction, but I haven't found any details in release notes and it worked in 1.3.7, so...
Let's consider the following custom tag lib:
class CustomTagLib {
static namespace = "c"
def linkTo = { attrs ->
def mapping = attrs.mapping ?: "test"
out << mapping
}
}
Then the following use case (in .gsp):
${c.linkTo(mapping: 'root')}
${c.linkTo()}
The effect is:
Line | Method ->> 26 | doFilter in DevModeSanityFilter.groovy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . in '' ^ 680 | run in java.lang.Thread Caused by GroovyPagesException: Error evaluating expression [c.linkTo()] on line [106]: wrong number of arguments ->> 106 | doCall in /grails-app/views/index.gsp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Caused by IllegalArgumentException: wrong number of arguments ->> 55 | doCall in Users_marcin_Grails_projects_Grails8064Issue_grails_app_views_index_gsp$_run_closure2_closure20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 67 | run in Users_marcin_Grails_projects_Grails8064Issue_grails_app_views_index_gsp | 26 | doFilter in DevModeSanityFilter.groovy | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . in '' ^ 680 | run in java.lang.Thread
Switching to the same parameters number fixes the issue. Moreover, it is necessary to restart the app, ie. only modifying the view does not help the situation.
I attach sample project with the issue.
-
Hide
- TagLibIssue.zip
- 15/Nov/11 10:38 AM
- 230 kB
- Marcin Świerczyński
-
- Grails8064Issue/.classpath 0.7 kB
- Grails8064Issue/.idea/.name 0.0 kB
- Grails8064Issue/.idea/compiler.xml 0.6 kB
- Grails8064Issue/.../profiles_settings.xml 0.1 kB
- Grails8064Issue/.idea/encodings.xml 0.2 kB
- Grails8064Issue/.idea/misc.xml 11 kB
- Grails8064Issue/.idea/modules.xml 0.4 kB
- Grails8064Issue/.idea/vcs.xml 0.2 kB
- Grails8064Issue/.idea/workspace.xml 24 kB
- Grails8064Issue/.project 0.5 kB
- Grails8064Issue/.../org.codehaus.groovy.eclipse.preferences.prefs 0.1 kB
- Grails8064Issue/application.properties 0.1 kB
- Grails8064Issue/.../ApplicationResources.groovy 0.1 kB
- Grails8064Issue/.../BootStrap.groovy 0.1 kB
- Grails8064Issue/.../BuildConfig.groovy 2 kB
- Grails8064Issue/grails-app/.../Config.groovy 4 kB
- Grails8064Issue/.../DataSource.groovy 1 kB
- Grails8064Issue/.../resources.groovy 0.0 kB
- Grails8064Issue/.../UrlMappings.groovy 0.2 kB
- Grails8064Issue/.../messages.properties 3 kB
- Grails8064Issue/.../messages_cs_CZ.properties 3 kB
- Grails8064Issue/.../messages_da.properties 3 kB
- Grails8064Issue/.../messages_de.properties 4 kB
- Grails8064Issue/.../messages_es.properties 3 kB
- Grails8064Issue/.../messages_fr.properties 2 kB
- Grails8064Issue/.../messages_it.properties 2 kB
- Grails8064Issue/.../messages_ja.properties 4 kB
- Grails8064Issue/.../messages_nl.properties 3 kB
- Grails8064Issue/.../messages_pt_BR.properties 3 kB
- Grails8064Issue/.../messages_pt_PT.properties 3 kB
Issue Links
- is related to
-
GRAILS-8208
Inexplicable errors in taglib execution
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
I think this was fixed when
GRAILS-8208was resolved.