Closed JessicaFrank closed 2 years ago
community issue. Brought up in LHI debugging call.
Happened again with a Kansas interview. Very hard to debug. We need to add an author warning that they've left off a variable or remove the code that adds that empty string. Not sure how we'd save no variable name variables then, but we need to brainstorm this.
Maybe the variable name could be autogenerated and a warning presented in Author?
I like that idea. Maybe look first to field label for name. If that's blank too, at least name it "Unnamed variable 1" or something like that.
Here's what the answer file looks like when a2j inserts the blank string. It's the blank string in the name of the variable that HotDocs is choking on.
@AnubhavDhingra the fix of inserting "Unassigned Variable" + string of numbers/letters/dashes is too long. HotDocs has a 50 character maximum for their variable names, so the new variables still break HotDocs.
I didn't get this confirmed, but I assume special characters, like dashes, may be an issue for HotDocs.
Can we implement a shorter string of random characters + no special characters?
@AnubhavDhingra the fix of inserting "Unassigned Variable" + string of numbers/letters/dashes is too long. HotDocs has a 50 character maximum for their variable names, so the new variables still break HotDocs.
I didn't get this confirmed, but I assume special characters, like dashes, may be an issue for HotDocs.
Can we implement a shorter string of random characters + no special characters?
Can be done.
when the variable name is missing:
I generate a name for the variable that's alphanumeric (no dashes or other special characters), remember what the generated name is, log a console warning with the field object itself for the author/easier discovery, and ensure the debug panel shows that the variable name was missing:
Post a message to the list serves detailing the author fix to this problem and how they can easily look for variable fields with missing variables by running a full report.
@janebitovi maybe this should be a part of this ? https://github.com/CCALI/a2jauthor/issues/269
@mikemitchel in the bigger picture, down the line, sure. In the meantime, this small change prevents the HotDocs error and is already implemented locally
Author creates a field then forgets to associate a variable with it.
A2J 4 ignored that field when creating the answer file.
A2J 6 creates a variable with the name (" ") and stores the user's input in it.
HotDocs freaks out with that empty string named variable, throws an error called "answer name missing" and causes the document to fail to assemble.
We need to remove the code that creates that blank string in A2J 6 AND do author outreach to ensure authors have assigned variables to all fields.
Posted a message to the list serves detailing the author fix to this problem and how they can easily look for variable fields with missing variables by running a full report.