Javascript error

On searching for patient or anything, it shows the following error:

A javascript error has occurred: Invalid content type: 'text/html;charset=utf-8’

How can I resolve this?

@richa09 which refapp version are you running?

Can you try reproduce this on qa-server Login and share the feedback.

@kdaud openmrs-webapp 2.6.0-SNAPSHOT

@sharif everthing is working fine on qa-server. I logged in as super user.

Can you share the server side log via

@dkayiwa This is what I’m getting on searching for patient pastebin

Also, on saving a patient or any entity, I’m being directed to page saying “Invalid or Missing CSRF Token. Try Going Back and Refresh the page after clearing the browser cache”. Even after clearing the cache, this comes up everytime. I’m not sure but I guess there is an issue with csrfguard.js.

here is the server side log: pastebin

In your openmrs application data folder, look for a file named and change the value of the property named org.owasp.csrfguard.Enabled to false . Then restart OpenMRS.

@dkayiwa No, this doesn’t help. I just realized that on starting the server, some lines in OpenmrsAutoComplete.js and openmrsSearch.js get changed. Dont know if this is creating the problem

Your application data folder is where your runtime properties file is. Overriding OpenMRS Default Runtime Properties - Documentation - OpenMRS Wiki

You could also get it under Local repository from your equivalent of this page: Login

1 Like

This worked for now. Thanks @dkayiwa