You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "David M. Johnson (Jira)" <ji...@apache.org> on 2020/02/29 20:41:00 UTC

[jira] [Created] (ROL-2160) Server admin page fails to display properly

David M. Johnson created ROL-2160:
-------------------------------------

             Summary: 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


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.

{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)