Reminder: Create & find trunk-related issues here. Legacy Trac tickets are still available. Problems? Workflow feedback? Need a module project? Open a support ticket.

OpenMRS Trunk

nameLayout.jsp Error with duplicate variable 'status' preventing patient entry and admin tasks

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Should Should
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: OpenMRS 1.6.0
  • Component/s: None
  • Severity:
    3
  • Keywords:
  • Description:
    Hide

    The error received is:

    ERROR - errorhandler_jsp._jspService(72) |2010-02-02 14:36:43,187| Error on page /openmrs/WEB-INF/view/admin/patients/newPatientForm.jsp
    javax.servlet.jsp.JspException: org.apache.jasper.JasperException: Unable to compile class for JSP:
    
    An error occurred at line: 200 in the jsp file: /WEB-INF/view/portlets/nameLayout.jsp
    Duplicate local variable status
    197:
            <input type="hidden" name="_$\{status.expression\}"/>
    198:
            <input type="checkbox" name="$\{status.expression\}"
    199:
                       <c:if test="$\{status.value == true\}">checked="checked"</c:if>
    
    200:
                       onClick="toggleLayer('<spring:bind path="personNameId">voidReasonRow-$\{status.value\}</spring:bind>'); if (voidedBoxClicked) voidedBoxClicked(this); "
    201:
            />
    202:
    </spring:bind>


    Potential fix: move the inner <spring:bind> out of the encompassing <spring:bind>

    Show
    The error received is:
    ERROR - errorhandler_jsp._jspService(72) |2010-02-02 14:36:43,187| Error on page /openmrs/WEB-INF/view/admin/patients/newPatientForm.jsp
    javax.servlet.jsp.JspException: org.apache.jasper.JasperException: Unable to compile class for JSP:
    
    An error occurred at line: 200 in the jsp file: /WEB-INF/view/portlets/nameLayout.jsp
    Duplicate local variable status
    197:
            <input type="hidden" name="_$\{status.expression\}"/>
    198:
            <input type="checkbox" name="$\{status.expression\}"
    199:
                       <c:if test="$\{status.value == true\}">checked="checked"</c:if>
    
    200:
                       onClick="toggleLayer('<spring:bind path="personNameId">voidReasonRow-$\{status.value\}</spring:bind>'); if (voidedBoxClicked) voidedBoxClicked(this); "
    201:
            />
    202:
    </spring:bind>

    Potential fix: move the inner <spring:bind> out of the encompassing <spring:bind>
  1. 2069.patch
    (0.9 kB)
    Burke Mamlin
    2010-02-04 20:19:06 EST

Activity

Hide
Sy Haas added a comment - 2010-02-04 20:19:06 EST

nameLayout.jsp

Show
Sy Haas added a comment - 2010-02-04 20:19:06 EST nameLayout.jsp
Hide
Ben Wolfe added a comment - 2010-02-05 14:29:22 EST

Applied the patch to trunk in rev:11983 and to 1.6.x in rev:11984. Thanks Sy!

Show
Ben Wolfe added a comment - 2010-02-05 14:29:22 EST Applied the patch to trunk in rev:11983 and to 1.6.x in rev:11984. Thanks Sy!
Hide
Marc Harrison added a comment - 2010-03-11 19:20:07 EST

This is a problem in the 1.5.x branch too. Ben can you apply the patch? I'm doing it locally so I can continue testing.

Show
Marc Harrison added a comment - 2010-03-11 19:20:07 EST This is a problem in the 1.5.x branch too. Ben can you apply the patch? I'm doing it locally so I can continue testing.
Hide
Ben Wolfe added a comment - 2010-03-11 21:44:24 EST

Darius, since you're in the backporting mood, want to do this one as well?

Show
Ben Wolfe added a comment - 2010-03-11 21:44:24 EST Darius, since you're in the backporting mood, want to do this one as well?
Hide
Darius Jazayeri added a comment - 2010-03-15 19:09:34 EDT

Backported to 1.5.x in rev:12464.

Show
Darius Jazayeri added a comment - 2010-03-15 19:09:34 EDT Backported to 1.5.x in rev:12464.

People

Dates

  • Created:
    2010-02-04 20:01:11 EST
    Updated:
    2010-07-08 16:20:39 EDT
    Resolved:
    2010-07-01 22:46:07 EDT