Closed georgd closed 3 years ago
Thanks for this, and sorry for the delay in responding. I'll take a look today and post back.
Progress. It's trying to parse the invalid value in the Abbrevs Filter and crashing there:
TypeError: can't convert undefined to object AbbrevsFilter.prototype.installAbbrevsForJurisdiction
I was able to trigger the error by registering the human-readable form used for display as the underlying value of the jurisdiction field. There was a storage bug in Jurism, fixed some time ago, that set this value in the database. There is a remapping method in there that I applied elsewhere to untangle the mess this created, and we should be able to use it here as well to recover in most cases. Where the remapping fails, we can fall back to "us."
That will get things working again, but it's not ideal. The client will show the value in the jurisdiction field without a highlight or other indication that it is invalid. I'll look into providing a highlight on the field when the remapping fails, so that users will be guided to correct invalid records.
More later ...
I have another task to cover this evening, but I'm making progress on this. I think the best approach may be to sniff the jurisdiction from the human-readable form and load that with a "us" fallback (to avoid the error), but flag human-readable DB entries with a yellow highlight, to encourage resetting them to get the correct internal value.
Nearly there with fixes. While investigating, though, I encountered a nasty bug, where setting a valid jurisdiction without specifying a court triggers eternal thrashing. Definitely not something we want people to encounter. Once that's fixed, I should be able to tidy up and move on to the release.
Thanks, the new feature, marking invalid jurisdiction values, looks good.
For those who might drive by this issue (and as a note to myself until this is documents), details of the fixes are at https://github.com/Juris-M/zotero/issues/105
A colleague reported issues with a document with badly formatted citations (no abbrevs applied) which from time to time warned
I could track it down to two entries with invalid values in the
Jurisdiction
field (see invalidJurisdiction.docx — The style used is JM IBFD with page labels).There were some troubles during troubleshooting (by breaking up the document in smaller chunks) because the error led to Juris-M not formatting any document until it was restarted. These are the steps:
Refresh
, the error will pop up (hitCancel
orYes
or do nothing).Refresh
-> nothing will happen.Can anything be done about this? It caused confusion because we erroneously thought, most of the citations were invalid, when, after the first error, no more document chunks produced any correct output.