From f2bfaeb7a95d9ab2854dd6bf036a9c7a0a97ee5c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 22 Oct 2022 05:28:02 -0400 Subject: [PATCH] Fix error message for invalid field in Item.setField() The error message was showing a field instead of an item type. https://forums.zotero.org/discussion/100598/error-1533410729-impossible-to-correct-date-field-in-items-added-with-zotero-conector-ver-6-0-15 --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 5eb9467335..840140fa2f 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -777,7 +777,7 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) { if (value !== false && !Zotero.ItemFields.isValidForType(fieldID, itemTypeID)) { let msg = "'" + field + "' is not a valid field for type '" - + Zotero.ItemFields.getName(itemTypeID) + "'"; + + Zotero.ItemTypes.getName(itemTypeID) + "'"; if (loadIn) { Zotero.debug(msg + " -- ignoring value '" + value + "'", 2);