Error adding OWA Icon to the Reference Application

Tags: #<Tag:0x00007f1f7f5d4d50>

I am getting this error while adding a demo OWA Icon to the reference application. Can anyone help me out?

I am following this link for the same : https://wiki.openmrs.org/display/docs/Adding+OWA+Icon+to+the+Reference+Application+Homepage

Regards

Prabodh

cc: @suthagar23

Hi @pkatopenmrs

I think the problem with the URL since now we are following to add the version tags with the OWA name as follows : systemadminstration-1.1. So your URL should be added with as ,

owa/systemadminstration-1.1/index.html

(Please check the version also which you have installed)

P.S : I have edited the Wiki docs with this update - https://wiki.openmrs.org/pages/viewpage.action?pageId=114393800

Thanks,

2 Likes

Is it a persistent issue? Or something random, because the server appears to be down from the error message.

I am not sure about this issue :confused: @wyclif. I just wanted to check how “Add app definition” works! Well it runs fine on the demo.openmrs.org though.

Btw @suthagar23 giving the version tag didn’t help. Can you please explain about the different json extensions we are providing? I mean I have just created one basic sample OWA with a name , say smartowa, and uploaded it. And I am just trying to add the icon on the home page. The manifest file says the default version as 0.1.0 but adding the tag to the url doesn’t help :confused:

It should work @pkatopenmrs. I couldn’t find any other problems with your JSON configuration. Could you provide the logs with the error trace which created at this moment? It may provide some more information to understand the exact problem.

Ok @suthagar23 just performing a quick check, If I have yet not created any OWA and I give this to the app definition :

{

"id": "sysadmin",
"description": "OpenMRS System Administration",
"order": 0,
"extensions": [
    {
        "id": "demoapp.homepageLink",
        "extensionPointId": "org.openmrs.referenceapplication.homepageLink",
        "type": "link",
        "label": "Sys Admin",
        "url": "owa/systemadminstration-1.1/index.html",
        "icon": "icon-list-alt",
        "requiredPrivilege": "Replace with a privilege name, or else remove"
    }
]

}

Should this work? I mean I should get a icon at homepage which does nothing, right?

yes @pkatopenmrs, I just copied this and tried to create a Icon in the home page. I was able to make it.

I think there might be some issues which may be the reason for this issue. Better to check the log trace

Ok, now the problem is, that when I do it, it shows the same error and my logs are clear :confused: !? Wait I will recheck and update you with logs :slight_smile:

ohh, So did you check your browser JS console and network tap for the issues while clicking on the save button?

I think this is the problem?

I think the content type must be “application/json” rather than “text/html” !?

What do you think?

Yes might be, In my system the content type is “application/json”.

BTW the request shows, it fetched from the cache. So could you try again after cleaning the cache?

if not this work, Try to send a POST request through the Postman app for this link, “http://localhost:8080/openmrs/referenceapplication/verifyJson.htm” with the content of,

json: {

"id": "moduleInstaller",
"description": "OpenMRS System Administration",
"order": 0,
"extensions": [
    {
        "id": "demoapp.homepageLink",
        "extensionPointId": "org.openmrs.referenceapplication.homepageLink",
        "type": "link",
        "label": "Sys Admin",
        "url": "owa/systemadminstration-1.1/index.html",
        "icon": "icon-list-alt",
        "requiredPrivilege": "Replace with a privilege name, or else remove"
    }
]
}