[ 
https://issues.apache.org/jira/browse/ROL-2160?focusedWorklogId=395509&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-395509
 ]

ASF GitHub Bot logged work on ROL-2160:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Feb/20 20:50
            Start Date: 29/Feb/20 20:50
    Worklog Time Spent: 10m 
      Work Description: snoopdave commented on pull request #55: [ROL-2160] Fix 
for Server admin page failes to render bug
URL: https://github.com/apache/roller/pull/55
 
 
   This PR works-around an apparent Struts but by showing weblog handle instead 
of name in front-page select. More details here: 
https://issues.apache.org/jira/browse/ROL-2160
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 395509)
    Remaining Estimate: 0h
            Time Spent: 10m

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

Reply via email to