Add relationship field disabled for non admin users

Hi there,

I am facing something strange with all my programs that have a relationship. Only admins are being able to add relationships. When a non admin user tries to add a relationship all fields appear disabled on the registration form.

Relationship types and Tracked entity types were shared with the users.

Please help.

Hi @nvictor, thank you for posting to the community! I believe that this could be because these users don’t have the authorities to Add/update the relationship types. Would you please recheck the authorities for the role that is assigned to these non-admin users? From the Users app > Roles > authorities and make sure that the “Relationship type” is selected.

Hi @Gassim,

Thank you for replying. I have tried that and still didn’t work. I have even checked all authorities on that field but didn’t work as well.

Hey @nvictor,
Thank you! Okay, may I ask you to take a screenshot of the browser’s developers tools (F12) one for the console tab and one for the network tab. Before taking the screenshot reload the page where the relationship field is disabled! (: If there are any errors in the Network tab, we’ll need to see the HTTP requests - please share!


Hi @Gassim,

Here goes. The full text is

JQMIGRATE: Migrate is installed, version 3.0.0
index.html:124 GET Sistema de Monitoria e Avaliação net::ERR_ABORTED 500
index.js:26 Initializing Header Bar v28.0.3
index.html#/:1 [Intervention] Slow network is detected. See Intervention: WebFonts use adaptive timeouts to take fallback fonts - Chrome Platform Status for more details. Fallback font will be used while loading: Sistema de Monitoria e Avaliação
index.html#/:1 [Intervention] Slow network is detected. See Intervention: WebFonts use adaptive timeouts to take fallback fonts - Chrome Platform Status for more details. Fallback font will be used while loading: Sistema de Monitoria e Avaliação
index.html#/:1 [Intervention] Slow network is detected. See Intervention: WebFonts use adaptive timeouts to take fallback fonts - Chrome Platform Status for more details. Fallback font will be used while loading: Sistema de Monitoria e Avaliação
DevTools failed to load source map: Could not load content for Sistema de Monitoria e Avaliação HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
dhis2.angular.directives.js:20 on outree
dhis2.angular.directives.js:31 Finished loading orgunit tree
tracker-capture.js?=27c329767a5bc7c9f94c:142 Loading required meta-data
tracker-capture.js?
=27c329767a5bc7c9f94c:256 in programs…
tracker-capture.js?_=27c329767a5bc7c9f94c:172 Finished loading meta-data
dhis2.angular.directives.js:20 on outree
angular.js:9866 GET Sistema de Monitoria e Avaliação 404
(anonymous) @ angular.js:9866
n @ angular.js:9667
f @ angular.js:9383
(anonymous) @ angular.js:13248
$eval @ angular.js:14466
$digest @ angular.js:14282
$apply @ angular.js:14571
(anonymous) @ services.js:1255
fire @ jquery.js:3317
fireWith @ jquery.js:3447
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:264
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
angular.js:9866 GET Sistema de Monitoria e Avaliação 404
(anonymous) @ angular.js:9866
n @ angular.js:9667
f @ angular.js:9383
(anonymous) @ angular.js:13248
$eval @ angular.js:14466
$digest @ angular.js:14282
$apply @ angular.js:14571
(anonymous) @ services.js:1255
fire @ jquery.js:3317
fireWith @ jquery.js:3447
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:264
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
dhis2.angular.directives.js:20 on outree
jquery.js:6178 [Intervention] Slow network is detected. See Intervention: WebFonts use adaptive timeouts to take fallback fonts - Chrome Platform Status for more details. Fallback font will be used while loading: Sistema de Monitoria e Avaliação
index.html#/dashboard?tei=ODKAndR2ISG&program=iSPc45re0MZ&ou=ghoVssAdUpT:1 [DOM] Found 3 elements with non-unique id #day: (More info: Create Amazing Password Forms - The Chromium Projects) <input type=​"number" name=​"days" ng-model=​"age.days" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘days’| translate}​}​" ng-attr-title=​"{{‘days’| translate}​}​" class=​"form-control no-left-radius no-right-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"day" placeholder=​"Days" title=​"Days" disabled=​"disabled">​ <input type=​"number" name=​"days" ng-model=​"age.days" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘days’| translate}​}​" ng-attr-title=​"{{‘days’| translate}​}​" class=​"form-control no-left-radius no-right-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"day" placeholder=​"Days" title=​"Days" disabled=​"disabled">​ <input type=​"number" name=​"days" ng-model=​"age.days" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘days’| translate}​}​" ng-attr-title=​"{{‘days’| translate}​}​" class=​"form-control no-left-radius no-right-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"day" placeholder=​"Days" title=​"Days" disabled=​"disabled">​
index.html#/dashboard?tei=ODKAndR2ISG&program=iSPc45re0MZ&ou=ghoVssAdUpT:1 [DOM] Found 3 elements with non-unique id #month: (More info: Create Amazing Password Forms - The Chromium Projects) <input type=​"number" name=​"months" ng-model=​"age.months" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘months’| translate}​}​" ng-attr-title=​"{{‘months’| translate}​}​" class=​"form-control no-right-radius no-left-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"month" placeholder=​"Months" title=​"Months" disabled=​"disabled">​ <input type=​"number" name=​"months" ng-model=​"age.months" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘months’| translate}​}​" ng-attr-title=​"{{‘months’| translate}​}​" class=​"form-control no-right-radius no-left-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"month" placeholder=​"Months" title=​"Months" disabled=​"disabled">​ <input type=​"number" name=​"months" ng-model=​"age.months" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘months’| translate}​}​" ng-attr-title=​"{{‘months’| translate}​}​" class=​"form-control no-right-radius no-left-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"month" placeholder=​"Months" title=​"Months" disabled=​"disabled">​
index.html#/dashboard?tei=ODKAndR2ISG&program=iSPc45re0MZ&ou=ghoVssAdUpT:1 [DOM] Found 3 elements with non-unique id #year: (More info: Create Amazing Password Forms - The Chromium Projects) <input type=​"number" name=​"years" ng-model=​"age.years" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘years’| translate}​}​" ng-attr-title=​"{{‘years’| translate}​}​" class=​"form-control no-right-radius no-left-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"year" placeholder=​"Years" title=​"Years" disabled=​"disabled">​ <input type=​"number" name=​"years" ng-model=​"age.years" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘years’| translate}​}​" ng-attr-title=​"{{‘years’| translate}​}​" class=​"form-control no-right-radius no-left-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"year" placeholder=​"Years" title=​"Years" disabled=​"disabled">​ <input type=​"number" name=​"years" ng-model=​"age.years" ng-model-options=​"{updateOn:​ ‘blur’}​" ng-change=​"saveAge()​" ng-disabled=​"d2Disabled" d2-number-validator number-type=​"INTEGER_ZERO_OR_POSITIVE" ng-attr-placeholder=​"{{‘years’| translate}​}​" ng-attr-title=​"{{‘years’| translate}​}​" class=​"form-control no-right-radius no-left-radius ng-pristine ng-untouched ng-valid ng-valid-zero-positive-int" ng-class=​"{‘input-success’:​ d2AgeSaved}​" id=​"year" placeholder=​"Years" title=​"Years" disabled=​"disabled">​
angular.js:9866 GET Sistema de Monitoria e Avaliação 404
(anonymous) @ angular.js:9866
n @ angular.js:9667
f @ angular.js:9383
(anonymous) @ angular.js:13248
$eval @ angular.js:14466
$digest @ angular.js:14282
$apply @ angular.js:14571
(anonymous) @ services.js:1255
fire @ jquery.js:3317
fireWith @ jquery.js:3447
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:264
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
success (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262
IndexedDB (async)
request.onsuccess @ dhis2-storage-idb-e5bdf19229.js:262

Hey thank you! And the network tab please:

Hi @Gassim,

Do you have any idea about what is causing this?

Thanks

Hey I’d still need to search/ask for an answer. You see the red line you shared from the Network tab, would you please share the response? Like in this image:


Thank you!

Sharing


1 Like

Okay thanks! I have good news! Another CoP user @Pomi_Daniel faced this issue and shared the solution (The key 'nz0ABmrCGWk' was not found in the namespace 'trackerCaptureGridColumns')
Would you mind trying his solution if it solves the issue? If it doesn’t we’ll try to see what other steps we might need to take! Thank you! (:

BTW, what’s the version of the DHIS2 instance that you are using? (should’ve asked from the start) :slightly_smiling_face::pray:

Hi @Gassim

Version: 2.35.6
Build revision: 9979080

The referred solution is not my case. I have the user assigned to the OU

Hi @Gassim,

Thanks for helping. Do you have any news??

1 Like

The real way to solve the issue is to understand the cause behind it and to quote the current response:

@Markus
“The reason the fields are disabled is still not entirely clear. The point on trackerCaptureGridColumns is a general one, so you know that these specific errors are never relevant”

That’s because initially I first asked about the ‘trackerCaptureGridColumns’; however, I can also see from the text you posted from the console “Found 3 elements with non-unique id” for day, month, and year. Does this ring a bell? I will inquire about it.

Please, I would like to ask you if you try a different browser or clear all the cache in your browser, and see if anything changes? (including the error messages we are seeing.) Thanks!