Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-1698

saving the Edit policy form without specifying action results in stacktrace (regression)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0, 4.0
    • Fix Version/s: 6.0
    • Component/s: XMLUI
    • Labels:
      None
    • Environment:
      Google Chrome 23, Firefox 17
    • Attachments:
      0
    • Comments:
      4
    • Documentation Status:
      Not Required

      Description

      1) edit an item
      2) Authorizations...
      3) Add a new [anything] policy
      4) Save the form without specifying anything in "Select the action:" (both radio buttons are unchecked by default)

      Expected result (as in 1.8.x):
      "* No action selected" message is displayed, form is left open

      Actual result (in 3.x and 4.x):
      The following stacktrace is thrown:

      org.mozilla.javascript.EvaluatorException: Can't find method org.dspace.app.xmlui.aspect.administrative.FlowAuthorizationUtils.processEditPolicy(org.dspace.core.Context,number,java.lang.String,number,java.lang.String,org.mozilla.javascript.Undefined,java.lang.String,java.lang.String,java.lang.String,java.lang.String). (resource://aspects/Administrative/administrative.js#2318)

      The reason of this error is that an "org.mozilla.javascript.Undefined" value is passed in the actionID parameter. Because this is a regression, it's worth checking how the old code handled this. This was probably added with Advanced Embargo (DS-895, https://github.com/DSpace/DSpace/pull/43 ).

      https://github.com/DSpace/DSpace/blob/dspace-3.2/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/administrative/FlowAuthorizationUtils.java#L115

      https://github.com/DSpace/DSpace/blob/dspace-3.2/dspace-xmlui/src/main/resources/aspects/Administrative/administrative.js#L2318

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                helix84 Ivan Masár
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: