Scaffold: itemFromCSLJSON() throws isBaseField error with ACM Digital Library metadata
Hi,
I'm encountering a reproducible issue when testing the official ACM Digital Library translator using Zotero's Scaffold (Translator Editor).
The same ACM papers import successfully through Zotero Connector in Microsoft Edge, but running doWeb in Scaffold fails during ZU.itemFromCSLJSON().
ENVIRONMENT
OS: Windows (64-bit)
Zotero Desktop: 10.0.6 (64-bit)
Debug ID: D584471306
STEPS TO REPRODUCE
Open Scaffold (Translator Editor).
Load the latest official ACM Digital Library.js translator.
Navigate to:
https://dl.acm.org/doi/10.1145/3746059.3747617
Run doWeb.
The ACM citation API responds with HTTP 200 and valid JSON.
However, the translation fails with the following error:
TypeError: can't access property 2, fields[fieldID] is undefined
isBaseField@.../cachedTypes.js:151:9
itemFromCSLJSON@.../utilities_item.js:286:35
scrape@ACM Digital Library:173:5
ISOLATION TESTS
I selectively removed fields from the ACM CSL JSON before passing it to ZU.itemFromCSLJSON().
Results:
No fields removed: Error
Only original-date removed: Error
Only event-place removed: Error
Both original-date and event-place removed: Translation completes
This suggests that both fields can independently trigger the exception in Scaffold.
The behavior was also reproduced with another ACM paper:
https://dl.acm.org/doi/10.1145/3654777.3676379
EXPECTED BEHAVIOR
ZU.itemFromCSLJSON() should handle these CSL fields without throwing an exception, or gracefully ignore unsupported fields.
ADDITIONAL OBSERVATIONS
The same papers import successfully through Zotero Connector in Microsoft Edge.
Restarting Zotero did not resolve the issue.
Updating to the latest official ACM Digital Library translator did not resolve the issue.
The original translator exhibits this issue independently of my date normalization fix, which was merged in PR #3692:
https://github.com/zotero/translators/pull/3692
Could this be related to CSL field mapping in Scaffold's translation sandbox or Zotero Utilities?
Thank you!
I'm encountering a reproducible issue when testing the official ACM Digital Library translator using Zotero's Scaffold (Translator Editor).
The same ACM papers import successfully through Zotero Connector in Microsoft Edge, but running doWeb in Scaffold fails during ZU.itemFromCSLJSON().
ENVIRONMENT
OS: Windows (64-bit)
Zotero Desktop: 10.0.6 (64-bit)
Debug ID: D584471306
STEPS TO REPRODUCE
Open Scaffold (Translator Editor).
Load the latest official ACM Digital Library.js translator.
Navigate to:
https://dl.acm.org/doi/10.1145/3746059.3747617
Run doWeb.
The ACM citation API responds with HTTP 200 and valid JSON.
However, the translation fails with the following error:
TypeError: can't access property 2, fields[fieldID] is undefined
isBaseField@.../cachedTypes.js:151:9
itemFromCSLJSON@.../utilities_item.js:286:35
scrape@ACM Digital Library:173:5
ISOLATION TESTS
I selectively removed fields from the ACM CSL JSON before passing it to ZU.itemFromCSLJSON().
Results:
No fields removed: Error
Only original-date removed: Error
Only event-place removed: Error
Both original-date and event-place removed: Translation completes
This suggests that both fields can independently trigger the exception in Scaffold.
The behavior was also reproduced with another ACM paper:
https://dl.acm.org/doi/10.1145/3654777.3676379
EXPECTED BEHAVIOR
ZU.itemFromCSLJSON() should handle these CSL fields without throwing an exception, or gracefully ignore unsupported fields.
ADDITIONAL OBSERVATIONS
The same papers import successfully through Zotero Connector in Microsoft Edge.
Restarting Zotero did not resolve the issue.
Updating to the latest official ACM Digital Library translator did not resolve the issue.
The original translator exhibits this issue independently of my date normalization fix, which was merged in PR #3692:
https://github.com/zotero/translators/pull/3692
Could this be related to CSL field mapping in Scaffold's translation sandbox or Zotero Utilities?
Thank you!
-
adamsmithDuplicate of https://forums.zotero.org/discussion/134290/scaffold-itemfromcsljson-throws-isbasefield-error#latest
Upgrade Storage