[
http://opensource.atlassian.com/projects/roller/browse/ROL-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_13957
]
Nicolas Muller commented on ROL-1509:
-------------------------------------
The correction :
/**
* Get request parameter by name.
*/
public String getRequestParameter(String paramName) {
if (requestParameters != null) {
String[] values = (String[])requestParameters.get(paramName);
if (values != null && values.length > 0) {
return values[0];
}
}
return null;
}
It is necessary to verify that "requestParameters " is not null.
Thank you very much the Roller TEAM !!!!!
> Critical Error durant Preview when a template uses getRequestParameter
> ----------------------------------------------------------------------
>
> Key: ROL-1509
> URL:
> http://opensource.atlassian.com/projects/roller/browse/ROL-1509
> Project: Roller
> Issue Type: Bug
> Components: Page Rendering & Management
> Affects Versions: 3.1
> Environment: Windows/Linux (Ubuntu)
> Reporter: Nicolas Muller
> Assignee: Roller Unassigned
>
> We use the following line in a template (sotto for example) :
> $model.getRequestParameter("myParam")
> So when we try to try ti have a preview about the theme in the
> Preferences->Theme->Preview or with the "Full Preview" onto a post we have a
> NullPointerException.
> So the preview is never displayed in the navigator and a stacktrace is
> present in the log file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira