Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Testcase included:yes
Description
If you have a URL mapping like:
"404"(controller:'error', action:'notFound')
...and action and view like:
def notFound() {
render view: '404'
}
<!doctype html> <html> <head> <meta name="layout" content="main"/> <title>FOUR OH FOUR!</title> </head> <body> This is the 404 page </body> </html>
...what you find is the site mesh layout is executed twice in some way. This is noticeable if main.gsp layout uses 2x <r:layoutResources/> calls - it crashes as it tries to execute the third call for the request, to let you know something is wrong.
This does not happen if your URL mapping points straight to view 404.gsp view - it only happens if pointing at the controller.
See attached app - browse to http://localhost:8080/G201Sitemesh/somebullshit
-
Hide
- G201Sitemesh-bug-report-28032012.zip
- 28/Mar/12 7:10 AM
- 23 kB
- Marc Palmer
-
- grails-app/.../ApplicationResources.groovy 0.1 kB
- grails-app/conf/BootStrap.groovy 0.1 kB
- grails-app/conf/BuildConfig.groovy 2 kB
- grails-app/conf/Config.groovy 4 kB
- grails-app/conf/DataSource.groovy 1 kB
- grails-app/conf/UrlMappings.groovy 0.2 kB
- grails-app/conf/spring/resources.groovy 0.0 kB
- grails-app/.../ErrorController.groovy 0.1 kB
- grails-app/i18n/messages.properties 3 kB
- grails-app/.../messages_cs_CZ.properties 3 kB
- grails-app/i18n/messages_da.properties 3 kB
- grails-app/i18n/messages_de.properties 4 kB
- grails-app/i18n/messages_es.properties 3 kB
- grails-app/i18n/messages_fr.properties 2 kB
- grails-app/i18n/messages_it.properties 2 kB
- grails-app/i18n/messages_ja.properties 4 kB
- grails-app/i18n/messages_nl.properties 3 kB
- grails-app/.../messages_pt_BR.properties 3 kB
- grails-app/.../messages_pt_PT.properties 3 kB
- grails-app/i18n/messages_ru.properties 4 kB
- grails-app/i18n/messages_sv.properties 3 kB
- grails-app/i18n/messages_th.properties 6 kB
- grails-app/.../messages_zh_CN.properties 2 kB
- grails-app/views/error.gsp 0.3 kB
- grails-app/views/error/404.gsp 0.2 kB
- grails-app/views/index.gsp 3 kB
- grails-app/views/layouts/main.gsp 3 kB
- test/unit/.../ErrorControllerTests.groovy 0.3 kB
- application.properties 0.1 kB
Issue Links
- duplicates
-
GRAILS-8904
GSP layout applied twice when rendering view after a 404 error
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Hide
Donal Murtagh
added a comment -
Related issue with workaround http://jira.grails.org/browse/GRAILS-1844
Show
Donal Murtagh
added a comment - Related issue with workaround http://jira.grails.org/browse/GRAILS-1844
duplicates
GRAILS-8904