jakesays-old / freemedforms

Automatically exported from code.google.com/p/freemedforms
Other
0 stars 0 forks source link

New form doesn't show up in Preferences until clean reinstall of FMF #359

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. Environment is freshly compiled from master (06/26/2014) FMF 0.9.1 on Debian 
7 64 bits in debug mode
1.compile FMF in debug_mode 
2.use previously created /home/username/.freemedforms & 
/home/username/freemedforms folders
3.create a new completeform in /global_resources/forms/completeforms by 
copy/pasting an existing functional complete form, only changing the author's 
name and form name to be able to distinguish the new form the others
4. start FMF ./freemedforms_debug
5. answer yes when asked to detect new forms
6. Try to use the newly created form: Configuration/Preferences/Forms/Selector
7. The newly created form is not showing up in the list

What is the expected output? New form showing up in the list

What do you see instead? Nothing.

Workaround: reinstall FMF as another user in another /home or delete 
.freemedforms & freemedforms and reinstall FMF, then the new form is showing up.

Could this bug explain why user forms put in 
/home/username/freemedforms/Documents/forms/completeforms don't show up either? 
I didn't test it yet but I will.

Original issue reported on code.google.com by contact@medecinelibre.com on 29 Jun 2014 at 6:13

GoogleCodeExporter commented 9 years ago
You have to rename the complete form path as it is used as uid in the database.

/home/username/freemedforms/Documents/forms/completeforms/<NewFormNameWithoutCon
flict>

I've tested this feature without any problem with subforms. I'll test with 
complete forms

Original comment by eric.mae...@gmail.com on 30 Jun 2014 at 1:57

GoogleCodeExporter commented 9 years ago
I had renamed the folder with a different name of course. I tested it multiple 
times. It didn't work. But it worked after a clean reinstall: all changed to 
existing forms and the new forms appeared in the preferences. I was working 
inside the git path:

/global_resources/forms/completeforms

so I still have to test creating new complete forms inside 
/home/username/freemedforms

Couldn't it be related to the way the app tests for new folders? What's the 
.cpp file that deals with checking /global_resources/forms/ and 
/home/username/freemedforms for new folders containing new forms?

Original comment by contact@medecinelibre.com on 1 Jul 2014 at 10:56

GoogleCodeExporter commented 9 years ago
This issue was updated by revision e2f875bda73d.

Starting some unit-tests on the FormManager code

Original comment by eric.mae...@gmail.com on 1 Aug 2014 at 1:34

GoogleCodeExporter commented 9 years ago
This issue was updated by revision d99d2742c5f0.

Some more unit-tests

Original comment by eric.mae...@gmail.com on 3 Aug 2014 at 10:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 4741cb3b36c4.

Some unit-tests & corrections on the XmlIO plugin

Original comment by eric.mae...@gmail.com on 3 Aug 2014 at 10:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 44a401cd712c.

Updating Form::IFormIO::saveForm()

Original comment by eric.mae...@gmail.com on 3 Aug 2014 at 10:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 1054280fc994.

Adding some more FormManager unit-tests

Original comment by eric.mae...@gmail.com on 3 Aug 2014 at 10:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 463f6cf54861.

This patch mainly corrects this issue. We still need to add more unit-tests.

Original comment by eric.mae...@gmail.com on 3 Aug 2014 at 10:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision bfd7f056bc4f.

Some more unit-tests

Original comment by eric.mae...@gmail.com on 10 Aug 2014 at 7:30

GoogleCodeExporter commented 9 years ago
This issue was updated by revision f6cbd4b2edce.

Log

Original comment by eric.mae...@gmail.com on 10 Aug 2014 at 7:30

GoogleCodeExporter commented 9 years ago

Original comment by eric.mae...@gmail.com on 9 Sep 2014 at 6:14

GoogleCodeExporter commented 9 years ago
When I install 0.9.2 in debug mode with a complete form already in the home 
path, i get this:

Le fichier 
/home/elkcloner/freemedforms/Documents/forms/completeforms/arkanoidform/central.
xml n'est pas accessible

Erreur tag mismatch : line 28, colonne 20

The central.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FreeMedForms>

<FreeMedForms>

  <formdescription>
    <!-- Non translatable values -->
    <authors>Arkanoid II</authors>
    <version>test</version>
    <fmfv>0.9.1</fmfv>
    <cdate>2014-03-28</cdate>
    <lmdate>2014-03-28</lmdate>
    <icon>generalpractitioner.png</icon>
    <weblink>http://jerome.cc/w/index.php/Plugin</weblink>
    <bibliography>https://www.zotero.org/groups/freemedforms<bibliography/>

    <!-- Translatable values -->
    <license>GPLv3</license>
    <description lang="xx">AVK Plugin Test</description>
    <description lang="fr">Plugin AVK Test</description>
    <category lang="xx">General practice</category>
    <category lang="fr">Médecine générale</category>
    <specialties lang="xx">General practice</specialties>
    <specialties lang="fr">Médecine générale</specialties>
    <updateinfo>
    </updateinfo>

  </formdescription>

Line 28, column 20 corresponds to the closing bracket in </formdescription>

I hope that helps...

Original comment by contact@medecinelibre.com on 10 Sep 2014 at 3:44

GoogleCodeExporter commented 9 years ago
Then this window appears:

Un fichier invalide a été trouvé. Veuillez contacter votre administrateur 
logiciel.
Fichier : 
/home/elkcloner/freemedforms/Documents/forms/completeforms/arkanoidform/central.
xml
Erreur : Nombre de tags incorrect (MedForm)
Erreur tag mismatch : line 28, colonne 20

The xml file looks valid to me, I just copied it from gp_basic

Original comment by contact@medecinelibre.com on 10 Sep 2014 at 3:45

GoogleCodeExporter commented 9 years ago
So the forms that were already in the home path before the install of FMF 0.9.2 
seem to be taken into account! But the ones i try to add after the install 
don't show up in preferences.

Original comment by contact@medecinelibre.com on 10 Sep 2014 at 4:21

GoogleCodeExporter commented 9 years ago
Here is the complete central.xml file as requested.

Original comment by contact@medecinelibre.com on 11 Sep 2014 at 10:57

Attachments:

GoogleCodeExporter commented 9 years ago
Debug install from last master (commit 
4e05836984...15ca1f7a82fce7ef6d6cf5a0fad5e7), test_form (exact copy of 
gp_ultrabasic) is in /home/username/freemedforms/forms/completeforms/

The form works *only because* I added it manually to SqlLite database.

When I start the application, console prints:

"XmlFormIO                 ** ERROR(xmlformio.cpp:132) ** Fichier 
/media/data/dev
                          /freemedforms/global_resources/forms/completeforms/test_form
                          /central.xml n'existe pas"

Is looking for xmlforms files in source code tree normal behaviour for 
xmlformio.cpp ?

Original comment by contact@medecinelibre.com on 16 Nov 2014 at 8:43

GoogleCodeExporter commented 9 years ago
Sometimes, if something doesn't work, you try to fix it. If it keeps not 
working after you spent a lot of time trying to fix it, maybe it's time to 
change the way you try to do it.

I suggest using a dialog to select a zipped (zip or tar.gz or tar.bz2) file 
containing the form structure, the program would open it, test it and put 
everything directly in the database.

Original comment by contact@medecinelibre.com on 18 Nov 2014 at 2:18