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

Greenscript not loaded when 404 happens #10

Open
Pyppe opened this issue Mar 15, 2011 · 2 comments
Open

Greenscript not loaded when 404 happens #10

Pyppe opened this issue Mar 15, 2011 · 2 comments

Comments

@Pyppe
Copy link

Pyppe commented Mar 15, 2011

HOW TO REPRODUCE:

My app/views/errors/404.html is as follows:
#{extends 'main.html' /}
#{set title:'Page not found (HTTP 404)' /}

<h1>Page not found</h1>

<p>Ooops... page is not here.</p>

And the main.html uses these greenscript definitions:
#{greenscript.css 'jquery-ui/jquery-ui-1.8.7.custom main', output:'all'/}
#{greenscript.js 'jquery.kuntokanta jquery.json-2.2.min jquery.form-2.61.min jquery.cookie', output:'all' /}

These work fine with normal use-cases when page is found. It even works, if I explicitly set notFound() in my controller. But it does not work, if the Play framework itself "causes" that Not Found -page.

@travelstep
Copy link

Has this been resolved?

I get the same behaviour in test mode; Minimized CSS is not loaded. In production mode and in Jetty I get the following exception:

Template execution error (In {module:greenscript-1.2.6k}/app/views/tags/greenscript/gs_.html around line 23)
Execution error occured in template {module:greenscript-1.2.6k}/app/views/tags/greenscript/gs_.html. Exception raised was NullPointerException : Cannot invoke method declare() on null object.

play.exceptions.TemplateExecutionException: Cannot invoke method declare() on null object
at play.templates.BaseTemplate.throwException(BaseTemplate.java:84)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:252)
at play.templates.GroovyTemplate$ExecutableTemplate.invokeTag(GroovyTemplate.java:374)
at {module:greenscript-1.2.6k}/app/views/tags/greenscript/css.html.(line:1)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
at play.templates.GroovyTemplate$ExecutableTemplate.invokeTag(GroovyTemplate.java:374)
at /app/views/main.html.(line:12)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:262)
at play.templates.Template.render(Template.java:26)
at play.templates.GroovyTemplate.render(GroovyTemplate.java:184)
at play.server.PlayHandler.serve500(PlayHandler.java:707)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException: Cannot invoke method declare() on null object
at {module:greenscript-1.2.6k}/app/views/tags/greenscript/gs_.html.(line:23)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
... 11 more

@jonathonadler
Copy link

This still seems to be an issue. I haven't been able to track down the cause yet

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

3 participants