You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Nicolas Muller (JIRA)" <no...@atlassian.com> on 2007/07/31 12:26:25 UTC
[Roller-JIRA] Created: (ROL-1509) Critical Error durant Preview
when a template uses getRequestParameter
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
[Roller-JIRA] Updated: (ROL-1509) Critical Error durant Preview
when a template uses getRequestParameter
Posted by "David Johnson (JIRA)" <no...@atlassian.com>.
[ http://opensource.atlassian.com/projects/roller/browse/ROL-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Johnson updated ROL-1509:
-------------------------------
Assignee: David Johnson (was: Roller Unassigned)
Fix Version/s: 4.0
3.1.1
> 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: David Johnson
> Fix For: 3.1.1, 4.0
>
>
> 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
[Roller-JIRA] Commented: (ROL-1509) Critical Error durant Preview
when a template uses getRequestParameter
Posted by "Nicolas Muller (JIRA)" <no...@atlassian.com>.
[ 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
[Roller-JIRA] Resolved: (ROL-1509) Critical Error durant Preview
when a template uses getRequestParameter
Posted by "David Johnson (JIRA)" <no...@atlassian.com>.
[ http://opensource.atlassian.com/projects/roller/browse/ROL-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Johnson resolved ROL-1509.
--------------------------------
Resolution: Fixed
NPE in preview, fixed by adding null check around requestParameters reference
Fixed in trunk for 4.0
http://svn.apache.org/viewvc?view=rev&rev=563482
Fixed in roller_3.1 branch for 3.1.1
http://svn.apache.org/viewvc?view=rev&rev=563493
> 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: David Johnson
> Fix For: 3.1.1, 4.0
>
>
> 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