Ticket #714 (closed defect: fixed)

Opened 1 year ago

Last modified 6 months ago

get.*Citation.action throws a very ugly 500 error on articles that lack abstracts

Reported by: russ Assigned to: jsuttor
Priority: high Milestone:
Component: ambra Version: 0.8.1
Keywords: Cc:
Blocking: Blocked By:

Description

most front matter articles (ie, everything that's not a research articles) do not have abstracts.

getRisCitation.action and getBibTexCitation.action fail if there's no abstract.

correct behavior is to supply a citation download with an empty annotation field.

also, if these actions fail for any reason, the pubapp should display the pretty site error page and not an ugly tomcat 500 error page.

adding this to 0.8.2 so that remember to discuss it on monday.

Dependency Graph

Change History

12/05/07 16:24:34 changed by russ

here's the error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Expression citation.articleAbstract is undefined on line 17, column 9 in article/ris.ftl.
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
	org.plos.web.DummySSOFilter.doFilter(DummySSOFilter.java:95)
	org.plos.web.VirtualJournalContextFilter.doFilter(VirtualJournalContextFilter.java:148)
	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)

root cause

freemarker.core.InvalidReferenceException: Expression citation.articleAbstract is undefined on line 17, column 9 in article/ris.ftl.
	freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	freemarker.core.Expression.getStringValue(Expression.java:118)
	freemarker.core.Expression.getStringValue(Expression.java:93)
	freemarker.core.DollarVariable.accept(DollarVariable.java:76)
	freemarker.core.Environment.visit(Environment.java:196)
	freemarker.core.MixedContent.accept(MixedContent.java:92)
	freemarker.core.Environment.visit(Environment.java:196)
	freemarker.core.Environment.process(Environment.java:176)
	freemarker.template.Template.process(Template.java:232)
	org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:168)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
	org.plos.web.DummySSOFilter.doFilter(DummySSOFilter.java:95)
	org.plos.web.VirtualJournalContextFilter.doFilter(VirtualJournalContextFilter.java:148)
	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)

12/11/07 13:24:11 changed by jsuttor

  • status changed from new to closed.
  • resolution set to fixed.

(In [4173]) fixes #714, guard against null abstracts (valid data for some ArticleTypes?) in Citation templates

12/11/07 13:33:42 changed by jsuttor

Susanne has been pinged to see there are any other legitimate null values.

see #718 to address the Exception handling issue.

12/19/07 13:26:11 changed by russ

looks like this is working to me. i'll ask susanne to test on the related PLoS mantis ticket.

01/02/08 22:17:10 changed by jsuttor

(In [4324]) Merged revisions 4173 via svnmerge from http://gandalf.topazproject.org/svn/branches/0.8.2

........

r4173 | jsuttor | 2007-12-11 13:24:10 -0800 (Tue, 11 Dec 2007) | 2 lines

fixes #714, guard against null abstracts (valid data for some ArticleTypes?) in Citation templates

........

07/16/08 11:01:46 changed by

  • milestone deleted.

Milestone 0.8.2 deleted