Changes

Jump to: navigation, search

Addon:Forms Gramplet

192 bytes added, 04:57, 6 May 2020
Tips on debugging your custom form definitions
====Tips on debugging your custom form definitions====
After creating or updating a form (in <code>custom.xml</code> or <code>test.xml</code>) to make sure your Form is correctly formatted use a text editor that includes an XML mode and syntax check, (like <code>NotePad++</code>, and install the "<code>XML Tools</code>" plugin), then you can load your custom form and the "XML tools" editor will inform be able to tell you if your Form's XML code is formatted correctly.
If the XML form check worked then start Gramps to test it and if the {{man button|New}} and {{man button|Edit}} buttons don't appear in the {{man label|Forms Gramplet}} then there is a good chance that an XML syntax (or other) error has occurred. The {{man label|Forms Gramplet}} will not tell you where the error is, but luckily you may get a message in <code>grampsXX.log</code> (in the root of gramps user directory) that may look like:
File "AIO/xml/dom/expatbuilder.py", line 207, in parseFile xml.parsers.expat.ExpatError: mismatched tag: line 12, column 10</nowiki>
If there are other (non-syntax) errors in the file then when you use the {{man button|New}} button and select the form, it will probably fail and suggest you restart Gramps, The error message if you open the details first you will see some details which may give you a clue as to where the issue is (start from the bottom of the error message), the following is an example:
<nowiki>
14
edits

Navigation menu