[ 
https://jira.codehaus.org/browse/CONTINUUM-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=361655#comment-361655
 ] 

Brent N Atkinson edited comment on CONTINUUM-2723 at 1/22/15 2:12 PM:
----------------------------------------------------------------------

It appears the problem is the dynamic-attributes.ftl template in struts2-core:

{code}
<#if (parameters.dynamicAttributes?? && parameters.dynamicAttributes?size > 
0)><#rt/>
<#assign aKeys = parameters.dynamicAttributes.keySet()><#rt/>
<#list aKeys as aKey><#rt/>
  <#assign keyValue = parameters.dynamicAttributes[aKey]/>
  <#if keyValue?is_string>
      <#assign value = struts.translateVariables(keyValue)!keyValue/>
  <#else>
      <#assign value = keyValue?string/>
  </#if>
 ${aKey}="${value?html}"<#rt/>
</#list><#rt/>
</#if><#rt/>
{code}

When the dynamic attribute maps contains the key 'size', this assignment:

{code}
keyValue = parameters.dynamicAttributes[aKey]
{code}

Yields a method, and not the value for the key. The reason is that the bean is 
wrapped and by default, method names shadow the contained map values. It is 
possible that this can be fixed by changing the template to look something like 
the following:

{code}
keyValue = parameters.dynamicAttributes.get(aKey)
{code}


was (Author: batkinson):
It appears the problem is the dynamic-attributes.ftl template in struts2-core:

{code}
<#if (parameters.dynamicAttributes?? && parameters.dynamicAttributes?size > 
0)><#rt/>
<#assign aKeys = parameters.dynamicAttributes.keySet()><#rt/>
<#list aKeys as aKey><#rt/>
  <#assign keyValue = parameters.dynamicAttributes[aKey]/>
  <#if keyValue?is_string>
      <#assign value = struts.translateVariables(keyValue)!keyValue/>
  <#else>
      <#assign value = keyValue?string/>
  </#if>
 ${aKey}="${value?html}"<#rt/>
</#list><#rt/>
</#if><#rt/>
{code}

> Edit button does not work - generates internal error
> ----------------------------------------------------
>
>                 Key: CONTINUUM-2723
>                 URL: https://jira.codehaus.org/browse/CONTINUUM-2723
>             Project: Continuum
>          Issue Type: Bug
>    Affects Versions: 1.4.2
>         Environment: 
> https://continuum-ci.apache.org/continuum/projectView.action?projectId=107
>            Reporter: SebbASF
>            Priority: Blocker
>
> Press Edit button under the project summary, and Continuum responds with:
> https://continuum-ci.apache.org/continuum/httpError.action?errorCode=500
> The URL requested results in an internal error. 
> It does not appear to be possible to edit the project.
> I think this started happening a while back after a security fix was added.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to