Scaffold: itemFromCSLJSON() throws isBaseField error
**Title: Scaffold: itemFromCSLJSON() throws isBaseField error for ACM CSL original-date and event-place**
Hi,
I'm encountering a reproducible issue when testing the official ACM Digital Library translator in Zotero's Scaffold (Translator Editor).
The same ACM DOI can be imported through Zotero Connector in Microsoft Edge, but running `doWeb` in Scaffold fails during `ZU.itemFromCSLJSON()`.
**Steps to reproduce**
1. Open Scaffold and load the official `ACM Digital Library.js`.
2. Open https://dl.acm.org/doi/10.1145/3654777.3676379.
3. Run `doWeb` with the original CSL conversion logic.
The ACM citation API successfully returns the requested metadata:
```text
DOI: 10.1145/3654777.3676379
JSON exists: true
Items exists: true
Items count: 1
DOI found: true
```
However, the conversion fails with:
```text
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:180:4
```
**Isolation tests**
I copied the CSL object and selectively removed fields before passing it to `ZU.itemFromCSLJSON()`.
| CSL fields removed | Result |
|---|---|
| None | Error |
| `original-date` only | Error |
| `event-place` only | Error |
| Both `original-date` and `event-place` | Translation completes |
This suggests that each field independently triggers the same field-mapping exception in Scaffold.
**Expected behavior**
`itemFromCSLJSON()` should process these fields without throwing an exception, or handle unsupported fields gracefully.
**Additional context**
- Zotero Connector in Microsoft Edge successfully imports the ACM paper.
- Restarting Zotero does not resolve the Scaffold error.
- The problem is reproducible with the original translator, independently of my date normalization patch.
- Related translator PR: https://github.com/zotero/translators/pull/3692
**Environment**
- OS: Windows
- Zotero version: [version]
- Zotero Connector version: [version]
- Debug ID: [if available]
Could this be a Zotero Utilities CSL field-mapping issue, or is there a difference in how Scaffold initializes or uses these mappings?
Hi,
I'm encountering a reproducible issue when testing the official ACM Digital Library translator in Zotero's Scaffold (Translator Editor).
The same ACM DOI can be imported through Zotero Connector in Microsoft Edge, but running `doWeb` in Scaffold fails during `ZU.itemFromCSLJSON()`.
**Steps to reproduce**
1. Open Scaffold and load the official `ACM Digital Library.js`.
2. Open https://dl.acm.org/doi/10.1145/3654777.3676379.
3. Run `doWeb` with the original CSL conversion logic.
The ACM citation API successfully returns the requested metadata:
```text
DOI: 10.1145/3654777.3676379
JSON exists: true
Items exists: true
Items count: 1
DOI found: true
```
However, the conversion fails with:
```text
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:180:4
```
**Isolation tests**
I copied the CSL object and selectively removed fields before passing it to `ZU.itemFromCSLJSON()`.
| CSL fields removed | Result |
|---|---|
| None | Error |
| `original-date` only | Error |
| `event-place` only | Error |
| Both `original-date` and `event-place` | Translation completes |
This suggests that each field independently triggers the same field-mapping exception in Scaffold.
**Expected behavior**
`itemFromCSLJSON()` should process these fields without throwing an exception, or handle unsupported fields gracefully.
**Additional context**
- Zotero Connector in Microsoft Edge successfully imports the ACM paper.
- Restarting Zotero does not resolve the Scaffold error.
- The problem is reproducible with the original translator, independently of my date normalization patch.
- Related translator PR: https://github.com/zotero/translators/pull/3692
**Environment**
- OS: Windows
- Zotero version: [version]
- Zotero Connector version: [version]
- Debug ID: [if available]
Could this be a Zotero Utilities CSL field-mapping issue, or is there a difference in how Scaffold initializes or uses these mappings?
Upgrade Storage