Forms created with XMLFormgen donot save #382

Open
arnabnaha opened this Issue Dec 11, 2016 · 10 comments

Projects

TODO in 5.0.0 Release

3 participants

@arnabnaha
Member

Hello,
while testing out for any bugs in 5.0.0 before the release, I found that the forms which were created by xmlformgen are not saving anymore after clicking save button. Other forms works fine. I tried checking the php error log, but there wasnt any warnings/errors recorded there. Kindly help with this issue, otherwise all the forms made by xmlformgen which is a great tool for making customised forms goes waste.

@bradymiller
Member

couple quick question:

  1. Are you seeing anything in the javascript error log (can see this in firefox settings->developer->web console)?
  2. If you rebuild the form with xmlformgen, are you still having the issue?
@arnabnaha
Member

Hi Brady,

Let me try and rebuild the form and will get back to you with both the answers.

@bradymiller
Member

1 more question:
3. Is this issue happening in both the old frames layout and the new tabs layout?

@arnabnaha
Member

Hi Brady

Answer1..here it is, what shows up in the webconsole

Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead[Learn More] index.js:1
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/ index.js:4:14079
ReferenceError: $ is not defined[Learn More] load_form.php:471:1

Answer 2. I havent tried rebuilding...I am doing it now

Answer 3... The issue is happening in both the format..tabs and frame...

@arnabnaha
Member

Hi Brady,

The form gets saved after recreating it with xmlformgen again.

@bradymiller
Member

That's good to hear. We have centralized the jquery assets(from library/js to standard public/assets), which likely did this. This will likely affect all custom forms. The rational was since we are going to 5.0, ok to break some things to get the code modernized. But, will discuss this on the forums to get feedback on best way to avoid this issue in the future (since we will keep needing to update the jquery library version, don't want to force the user to modify this every time).

@bradymiller bradymiller self-assigned this Dec 12, 2016
@bradymiller
Member

Was hoping to get input on this issue.

The current 5.0.0 planned release will break custom forms since the jquery libraries have all been migrated to assets. To avoid this, should we place a jquery library(1 file) in the original place. Or should we force custom forms to be fixed by users (since we are releasing a milestone version)?

thanks,
-brady

@sunsetsystems
Contributor

I would say break them, but provide an easy way to fix it. Maybe replace jquery*.js with something that pops up an alert() warning that the form needs fixing, and pointing to instructions to copy the files for a temporary workaround.

@bradymiller
Member

To provide more details on this. It is mostly about 1 file at library/js/jquery.js (which is version 1.2.1) and will mostly just affect users that created forms with xmlformgen:
https://github.com/openemr/openemr/blob/rel-422/library/js/jquery.js

The solution would just involve placing that file back to prevent this issue(or a fix for the issue would be placing that file there by users upgrading). There's also a possiblity that custom code use other jquery version that were in library or other assets that have been migrated could be affect.

I am leaning towards breaking them and then in the User Guide FAQ, placing instructions on how to fix this issue(with 2 options of placing the original jquery file back or fixing the links; and will recommend fixing the links).

@sunsetsystems
Contributor

Yeah so I was thinking that to minimize confusion you could put a jquery.js file there with contents something like this:
alert('This form is obsolete. See http://www.open-emr.org/blahblah for more information.');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment