If a UI Policy is applied on list collector variables on a catalog item, when viewed in the RITM record, the form breaks and the List Collector displays as Loading.

This error is produced:
Uncaught TypeError: Cannot read property 'querySelectorAll' of null


Steps to Reproduce

Part 1
- Go to sc_cat_item.list
- Go to a Catalog item for example 'Access'
- Create a new variable set
- Add a new variable in the variable set
- Variable should be:
Type: List Collector
Question: Anything
Name: Anything
Variable attributes: no_filter
- Submit this variable
- Now create a UI policy action on the list collector variable you just created
- Set visible to true, mandatory to true for example;
- Check 'Apply on Requested Items'.
- Submit your UI policy action

Part 2
- Go sc_cat_item.list
- Click on Cat item 'Access' > Try it
- You should see that the list collector is fine. Select a value from slushbucket and click 'Order Now'.
- Click on the Req number and you should be displayed the form.
- Scroll down to the RITM related list and click on the RITM record.
- Notice that the form is broken and you are not shown the context menu when you right click but the browser options.

Observe the JavaScript error:
Uncaught TypeError: Cannot read property 'querySelectorAll' of null
at e._listCollectorMandatoryChild (js_includes_catalog.jsx:3340)
at e.changeCatLabel (js_includes_catalog.jsx:3442)
at e._setMandatory (js_includes_catalog.jsx:3304)
at e.setMandatory (js_includes_catalog.jsx:3217)
at e.setMandatory (js_includes_doctype.jsx:5514)
at e._runAction (ui_policy.jsx:628)
at e.runActions (ui_policy.jsx:587)
at e.runPolicy (ui_policy.jsx:37)
at e.runPolicyOnLoad (ui_policy.jsx:32)
at ui_policy_onLoad (ui_policy.jsx:788)


This problem has been fixed in Kingston Patch 4 and later releases. Possible workarounds are the following:

1. Check the mandatory checkbox of the List variable 

2. Create a Client script onLoad that set the field "list_collector" to mandatory:
g_form.setMandatory('variables.list_collector', true);


Related Problem: PRB1246090

Seen In


Fixed In

Kingston Patch 4

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-22 04:02:52