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

QuickFinder on Collection AddLine causes JavaScript Errors

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-9293JavaScript error on QuickFinder inside Collections
      KULRICE-6666Validation causes Javascript error with an addLine containing a checkbox or radio
      KULRICE-7110Conditional requirement bug in a Collection's addline
      KULRICE-13269Javascript error when selecting the lookup on the widgetInputOnly with Quickfinder demo
      KULRICE-7532required validation fails in StackedCollectionSubSection addLine
      KULRICE-9586Need to avoid required validation checks on addLine
      KULRICE-7209Agenda Editor: Javascript errors
      KULRICE-8087collection property "includeLineSelectionField" should ignore addLine row
      KULRICE-6364javascript error on adding a line to a collection on a Term Specification
      KULRICE-6732UserControl (Uif-Kim-PersonControl) causes JavaScript Error
    • Rice Module:
      KRAD
    • Sprint:
      Middleware 2.5.2 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      1

      Description

      Create a new Term Specification and use the Context Id quickfinder. This causes the following JS error:

      Uncaught Error: Syntax error, unrecognized expression: [name='newCollectionLines['document.newMaintainableObject.dataObject.contexts'].id']<br/>http://localhost:8080/kr-dev/plugins/jquery/jquery-1.8.3.js<br/>4680 krad.initialize.js:1470
      Uncaught Error: Syntax error, unrecognized expression: [name='newCollectionLines['document.newMaintainableObject.dataObject.contexts'].id'] jquery-1.8.3.js:4680
      

      Clicking the context add button causes:

      Uncaught TypeError: Cannot read property 'element' of undefined<br/>http://localhost:8080/kr-dev/plugins/validate/jquery.validate.js<br/>99 krad.initialize.js:1470
      Uncaught TypeError: Cannot read property 'element' of undefined 
      

      Same issues with Categories. BTW, on load there is already this error:

      GET http://localhost:8080/kr-dev/scripts/krad.document.js 404 (Not Found) maintenance:816
      

      Works fine on 2.5.0 demo app.

        Issue Links

          Activity

          Hide
          Claus Niesen added a comment - - edited

          The JS error on the add of Contexts and Categories occurs because the validation fails on the read only fields.

          Changing the fields to Uif-DataFields (instead of Uif-InputFields) fixes this.

          Fixed: #49194

          This really should be fixed via KULRICE-14061.

          Show
          Claus Niesen added a comment - - edited The JS error on the add of Contexts and Categories occurs because the validation fails on the read only fields. Changing the fields to Uif-DataFields (instead of Uif-InputFields) fixes this. Fixed: #49194 This really should be fixed via KULRICE-14061 .
          Hide
          Claus Niesen added a comment - - edited

          The lookupFieldName (in showLookupDialog of krad.lookup.js) has quotes that caused the issue (caused by KULRICE-14024).

          Sample content of lookupFieldName:

           newCollectionLines['document.newMaintainableObject.dataObject.contexts'].id

          The solution is to use our escapeName method to escape the quotes.

          Fixed: #49191

          Show
          Claus Niesen added a comment - - edited The lookupFieldName (in showLookupDialog of krad.lookup.js) has quotes that caused the issue (caused by KULRICE-14024 ). Sample content of lookupFieldName: newCollectionLines['document.newMaintainableObject.dataObject.contexts'].id The solution is to use our escapeName method to escape the quotes. Fixed: #49191
          Hide
          Claus Niesen added a comment - - edited

          For the krad.document.js, the Uif-DocumentView (UifDocumentDefinitons.xml) needs to include that file from /krad/scripts/krad.document.js

          Fixed: #49193

          Show
          Claus Niesen added a comment - - edited For the krad.document.js, the Uif-DocumentView (UifDocumentDefinitons.xml) needs to include that file from /krad/scripts/krad.document.js Fixed: #49193

            People

            • Assignee:
              Claus Niesen
              Reporter:
              Claus Niesen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile

                  Structure Helper Panel