[KULRICE-14043] QuickFinder on Collection AddLine causes JavaScript Errors Created: 19/Nov/14  Updated: 16/Jan/15  Resolved: 20/Nov/14

Status: Closed
Project: Kuali Rice Development
Component/s: Development
Affects Version/s: None
Fix Version/s: 2.5.2
Security Level: Public (Public: Anyone can view)

Type: Bug Fix Priority: Blocker
Reporter: Claus Niesen Assignee: Claus Niesen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
discovered KULRICE-14061 Collection add line validation fails ... Closed
fixes KULRICE-14044 JS Error on Travel Account Maintenanc... Closed
relates to KULRICE-14044 JS Error on Travel Account Maintenanc... Closed
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:
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?:
Story Points: 1


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.

Comment by Claus Niesen [ 20/Nov/14 ]

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

Fixed: #49193

Comment by Claus Niesen [ 20/Nov/14 ]

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

Sample content of lookupFieldName:


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

Fixed: #49191

Comment by Claus Niesen [ 20/Nov/14 ]

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.

Generated at Sat Jul 04 23:56:07 CDT 2020 using JIRA 6.1.5#6160-sha1:a61a0fc278117a0da0ec9b89167b8f29b6afdab2.