Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-13224

Hitting cancel after opening KRAD doc from document search throws an error

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.5
    • Fix Version/s: Not version specific
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-13221KRAD transactional document navigation erroring out after coming from doc search
      KULRICE-5555after saving a maintenance doc, hitting the 'reload' button throws an exception
      KULRICE-1235Doc Search throws error - missing key
      KULRICE-12542Prevent KRAD views from opening in doc search iframe
      KULRICE-11740KRAD screen that handles attempts to open unsaved documents is broken in Rice 2.3.x
      KULRICE-5463Rice Dev: Trying to open newly created Campus Maintenance eDoc from doc search throws error
      KULRICE-11463On submit KRAD Docs don't return to the maint portal tab
      KULRICE-3836Search indexer not getting called after document transitions to canceled status
      KULRICE-1710Opening a Maintenance Document from the Action List or Document Search throws NPE
      KULRICE-5799JS errors appear after going to doc search and then to another view
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      As a user, when I open a document from document search and hit Cancel, I would like a valid page to be displayed instead of an error so that I can continue working.

      Note - The Cancel DOES work, it just fails on the redirect so if you go back to doc search and reopen the document it has been CANCELED and no cancel button is present.

      Steps to reproduce the issue:

      1. Create a new context document and save it
      2. go to document search
      3. open the saved document
      4. Select cancel and error will be thrown

      Kristina also mentioned that this was an issue for pessimistic locking.

      Method causing the problem for the Cancel issue is the getNavigationControllerService().returnToPrevious line in DocumentControllerServiceImpl.cancel :

      @Override
      public ModelAndView cancel(UifFormBase form) {
          performWorkflowAction((DocumentFormBase) form, UifConstants.WorkflowAction.CANCEL);
      
          return getNavigationControllerService().returnToPrevious(form);
      }
      

      Error when cancel is hit:

      HTTP Status 500 -
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      java.lang.RuntimeException: Business object class not passed to lookup.
      	org.kuali.rice.kns.web.struts.form.LookupForm.populate(LookupForm.java:171)
      	org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.processPopulate(KualiRequestProcessor.java:305)
      	org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.processFormActionAndForward(KualiRequestProcessor.java:226)
      	org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.strutsProcess(KualiRequestProcessor.java:220)
      	org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.process(KualiRequestProcessor.java:99)
      	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      	org.kuali.rice.kns.web.struts.action.KualiActionServlet.process(KualiActionServlet.java:202)
      	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58)
      	org.kuali.rice.kew.web.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:78)
      	org.kuali.rice.kew.web.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:62)
      	org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:89)
      	org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:77)
      	org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:327)
      	org.kuali.rice.krad.web.filter.DummyLoginFilter.doFilter(DummyLoginFilter.java:82)
      	org.kuali.rice.krad.web.filter.DummyLoginFilter.doFilter(DummyLoginFilter.java:62)
      	org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)
      	org.kuali.rice.krad.web.filter.BootstrapFilter.doFilter(BootstrapFilter.java:199)
      	org.kuali.rice.kns.web.filter.ParameterFilter.doFilter(ParameterFilter.java:53)
      	net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163)
      	org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37)
      	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      	org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
      	org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68)
      	org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:214)
      	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      	net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
      	net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
      

        Activity

        Hide
        Shannon Hess added a comment -

        For KULRICE-13162 I put in the following potential fix that redirects the user back to the hub if the document was opened from the document search. Since this is also happening in other places such as pessimistic locking, we need to look for a better solution.

        @Override
        public ModelAndView cancel(UifFormBase form) {
            performWorkflowAction((DocumentFormBase) form, UifConstants.WorkflowAction.CANCEL);
        
            if (KewApiConstants.DOCSEARCH_COMMAND.equals(((DocumentFormBase) form).getCommand())) {
                return getNavigationControllerService().returnToHub(form);
            }
        
            return getNavigationControllerService().returnToPrevious(form);
        }
        
        Show
        Shannon Hess added a comment - For KULRICE-13162 I put in the following potential fix that redirects the user back to the hub if the document was opened from the document search. Since this is also happening in other places such as pessimistic locking, we need to look for a better solution. @Override public ModelAndView cancel(UifFormBase form) { performWorkflowAction((DocumentFormBase) form, UifConstants.WorkflowAction.CANCEL); if (KewApiConstants.DOCSEARCH_COMMAND.equals(((DocumentFormBase) form).getCommand())) { return getNavigationControllerService().returnToHub(form); } return getNavigationControllerService().returnToPrevious(form); }
        Hide
        Kristina Taylor (Inactive) added a comment -

        I filed KULRICE-13221 for this yesterday, so we will handle it there.

        Show
        Kristina Taylor (Inactive) added a comment - I filed KULRICE-13221 for this yesterday, so we will handle it there.

          People

          • Assignee:
            Unassigned
            Reporter:
            Shannon Hess
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel