[
https://issues.apache.org/jira/browse/ROL-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David M. Johnson updated ROL-2160:
----------------------------------
Description:
The Server admin page (GlobalConfig.jsp) will fail to render properly in some
cases and will cause an error message like the below in the logs:
{code:java}
FTL stack trace ("~" means nesting-related):
- Failed at: #assign itemValue = struts.getText(va... [in template
"template/simple/select.ftl" at line 75, column 15]
- Reached through: @s.iterator value="parameters.list" [in template
"template/simple/select.ftl" at line 57, column 1]
- Reached through: #include "/${parameters.templateDir}/... [in template
"template/bootstrap/select.ftl" at line 22, column 1]
{code}
Steps to reproduce:
1) Create a weblog with an apostrophe in it's name (not handle, but name)
2) View the Server Admin page
3) See that the page only renders as far down as the front-page weblog select
and the error above appears in the log.
This problem appears to be caused by a bug in Struts. The front-page weblog
select specifies "name" as the listValueKey, Struts gets the name value for the
list-item and then uses that to attempt to lookup a locale-specific string.
Since there is no such string, Struts should just return the name value but
instead returns null which causes the error. This only appears to happen in
cases where the weblog name contains an apostrophe, but there may be other
characters that trigger the failure.
{code}
<s:select name="%\{#pd.name}" label="%\{getText(#pd.key)}"
value="%{properties[#pd.name].value}"
list="weblogs" listKey="handle" listValueKey="name"/>
{code}
We can fix via work-around, by passing "handle" instead of "name" the select
will work properly and the only downside is the user will see the each weblog's
handle instead of name in the select element.
was:
The Server admin page (GlobalConfig.jsp) will fail to render properly in some
cases and will cause an error message like the below in the logs:
{code:java}
FTL stack trace ("~" means nesting-related):
- Failed at: #assign itemValue = struts.getText(va... [in template
"template/simple/select.ftl" at line 75, column 15]
- Reached through: @s.iterator value="parameters.list" [in template
"template/simple/select.ftl" at line 57, column 1]
- Reached through: #include "/${parameters.templateDir}/... [in template
"template/bootstrap/select.ftl" at line 22, column 1]
{code}
Steps to reproduce:
1) Create a weblog with an apostrophe in it's name (not handle, but name)
2) View the Server Admin page
3) See that the page only renders as far down as the front-page weblog select
and the error above appears in the log.
This problem appears to be caused by a bug in Struts. The front-page weblog
select specifies "name" as the listValueKey, Struts gets the name value for the
list-item and then uses that to attempt to lookup a locale-specific string.
Since there is no such string, Struts should just return the name value but
instead returns null which causes the error. This only appears to happen in
cases where the weblog name contains an apostrophe, but there may be other
characters that trigger the failure.
{code}
<s:select name="%\{#pd.name}" label="%\{getText(#pd.key)}"
value="%{properties[#pd.name].value}"
list="weblogs" listKey="handle" listValueKey="name"/>
{code}
We can fix via work-around, by passing "handle" instead of "name" the select
will work properly and the only downside is the user will see the each weblog's
handle instead of name in the select element.
> Server admin page fails to display properly
> -------------------------------------------
>
> Key: ROL-2160
> URL: https://issues.apache.org/jira/browse/ROL-2160
> Project: Apache Roller
> Issue Type: Bug
> Components: User Interface - General
> Affects Versions: 6.0.0
> Reporter: David M. Johnson
> Assignee: David M. Johnson
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The Server admin page (GlobalConfig.jsp) will fail to render properly in some
> cases and will cause an error message like the below in the logs:
>
> {code:java}
> FTL stack trace ("~" means nesting-related):
> - Failed at: #assign itemValue = struts.getText(va... [in template
> "template/simple/select.ftl" at line 75, column 15]
> - Reached through: @s.iterator value="parameters.list" [in template
> "template/simple/select.ftl" at line 57, column 1]
> - Reached through: #include "/${parameters.templateDir}/... [in template
> "template/bootstrap/select.ftl" at line 22, column 1]
> {code}
>
> Steps to reproduce:
> 1) Create a weblog with an apostrophe in it's name (not handle, but name)
> 2) View the Server Admin page
> 3) See that the page only renders as far down as the front-page weblog select
> and the error above appears in the log.
> This problem appears to be caused by a bug in Struts. The front-page weblog
> select specifies "name" as the listValueKey, Struts gets the name value for
> the list-item and then uses that to attempt to lookup a locale-specific
> string. Since there is no such string, Struts should just return the name
> value but instead returns null which causes the error. This only appears to
> happen in cases where the weblog name contains an apostrophe, but there may
> be other characters that trigger the failure.
> {code}
> <s:select name="%\{#pd.name}" label="%\{getText(#pd.key)}"
> value="%{properties[#pd.name].value}"
> list="weblogs" listKey="handle" listValueKey="name"/>
> {code}
> We can fix via work-around, by passing "handle" instead of "name" the select
> will work properly and the only downside is the user will see the each
> weblog's handle instead of name in the select element.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)