htmlFormSimple 404s when editing HTMLForm with SimpleFormUI

1 view
Skip to first unread message

Craig A.

unread,
Feb 19, 2015, 8:07:48 AM2/19/15
to d...@openmrs.org
Hi Everyone,

I'm linking to a form in my fragment to edit an encounter with the SimpleFormUI. None of the java or css files are loading with 404 errors in the java console. I can't find anything in the documentation that addresses this. Am I missing something from the URL?

My Link in the fragment's view (.gsp):
<a class="visit-link" href="${ ui.pageLink("htmlformentryui", "htmlform/editHtmlFormWithSimpleUi", [ patientId: patient.id, encounterId: Identification.id, returnUrl: ui.thisUrl() ]) }">${ ui.message("SurvivorMIS.personalInformation.form2.label") }</a>

The URL:

The 404 errors in the Java Console:
Failed to load resource: the server responded with a status of 404 (Not Found)

Failed to load resource: the server responded with a status of 404 (Not Found)

Uncaught TypeError: Cannot read property 'hideField' of undefined

Failed to load resource: the server responded with a status of 404 (Not Found)

Thank you for your hep!
Craig

Darius Jazayeri

unread,
Feb 19, 2015, 8:27:05 PM2/19/15
to dev
Hi Craig,

It seems quite odd that the page loads, but those resources don't.

If you visit those urls directly, do they come up?

-Darius

--
OpenMRS Developers: http://om.rs/dev
Post: d...@openmrs.org | Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions: http://om.rs/id
 
Visit OpenMRS Talk at http://om.rs/talk for chat and discussions!

Craig A.

unread,
Feb 19, 2015, 9:49:23 PM2/19/15
to d...@openmrs.org
Hi Darius,

The resources do not come up when I visit the URL directly. The documentation suggests that I should create the link as follows:

.../htmlformentryui/htmlform/enterHtmlFormWithSimpleUi.page?patientId={{patient.uuid}}&visitId={{visit.uuid}}&definitionUiResource=referenceapplication:htmlforms/vitals.xml

I do not have the "&definitionUiResource=referenceapplication:htmlforms/vitals.xml" in my URL because the forms are loaded through meta-data sharing.

Note that the vitals form uses the StandardUI to edit the form. I changed the url of a demo vitals encounter and the resources failed to load as well.

I'm working on the standalone version 2.1 with no changes to the modules. (HTMLFormEntryUI v1.1).

Thank you!
Craig

Darius Jazayeri

unread,
Feb 19, 2015, 10:11:36 PM2/19/15
to dev
Hi Craig,

Since the "editHtmlFormWith..." page is coming up, then the link is correct.

I don't see why that page would be loading, but the resources aren't. (They're all in htmlformentryui, and they were in version 1.1, e.g. here).

All I can say is to look at the tomcat logs and look for...something strange. Or attach a debugger to this, and put a breakpoint in the UI Framework's resource servlet...

-Darius

Craig A.

unread,
Feb 20, 2015, 2:37:18 AM2/20/15
to dev
Hi Darius,

There was an issue with the path that was fixed with this commit on Oct 3rd. Unfortunately, htmlformentryui v1.1 was packaged on Oct 1st and that commit didn't make it in. I'll move on to the 1.2-SNAPSHOT version of the module.

Sincerely,
Craig
Reply all
Reply to author
Forward
0 new messages