User options in Reference Application header not working

I’m using OpenMRS Platform 1.11.4 along with Reference Application 2.3.1 modules as obtained from the openmrs(untouched). The user-options feature seems to work fine allowing me to change account settings on performing mouse hover over user icon in the header as shown below:

The above feature/implementation is a part of AdminUI module and I’ve obtained the latest release of the same i.e. openmrs-module-appui-1.4. When I build the module and add the corresponding omod in modules directory and run the application I’m unable to access user options on hover/click as shown below:

Do you have any javascript errors? Can you also refresh the page to ensure that the session is not expired? Am also assuming you are using the same browser and exact versions of other modules in the reference application.

There’s no javascript related errors and the module versions are just fine.

Hi Parth,

There is something not clear to me, you mentioned that you got it working with platform 1.11.4+ RA modules 2.3.1 which i believe are the latest, right? There is only one release of the adminui module so there can’t be another ‘latest’ version, do you mean when you install a build of the module off its latest code in master?

@wyclif you picked up the details wrongly as its appui and not adminui. I’m using appui 1.4.

Is there a compelling reason as to why you need to upgrade appui module? Module dependencies in the reference application are a little brittle since these modules are constantly evolving.

I haven’t upgraded the module or anything like that. Reference Application 2.3.1 modules(omod files - as downloaded from openmrs) contains appui-1.4 and thus I’ve got the release code for appui-1.4. I’m required to make some minor changes to the module implementation code in order to meet my requirements but when I build the module with changes and load the module with platform, I face the above mentioned issue.

Note: If I deploy the module without making any changes(appui-1.4 release code) I still face the above issue.

Thanks @wyclif and @dkayiwa for posting. I’ve found the part of code causing the issue. There’s a slight change which is required to be made in the appui module code.

Issue: The jquery code reacting to click/hover events on user-options control was placed wrongly. As per earlier implementation the jquery handling the click/hover events was written inside conditional check for ‘multiple-login-locations’ causing the condition to fail in my case.

Solution: I’ve moved the jquery concerning to user-options control out of the check and the issue is resolved.

Having/Not-having multiple login locations is highly practical and has nothing to do with the user-options control. Let me know if you need me to generate a pull request for the same.

Yes, please send a PR!

-Darius