Beta won't start
Just updated to the latest beta (5.0.85-beta.6+c3e390eb5) and now Zotero won't start.
This is the startup error message.
This is the startup error message.
ReferenceError: item is not defined
Zotero.Item.prototype.migrateExtraFields@chrome://zotero/content/xpcom/data/item.js:4634:23
Zotero.Schema</this.migrateExtraFields@chrome://zotero/content/xpcom/schema.js:633:21
From previous event:
ZoteroService@file:///C:/Program%20Files%20(x86)/Zotero/components/zotero-service.js:352:7
@chrome://zotero/content/include.js:4:14
There was an error starting Zotero.
Error: No creator exists at position 1
Zotero.Item.prototype.removeCreator@chrome://zotero/content/xpcom/data/item.js:1103:11
Zotero.Item.prototype.setType@chrome://zotero/content/xpcom/data/item.js:505:11
Zotero.Item.prototype.migrateExtraFields@chrome://zotero/content/xpcom/data/item.js:4632:5
Zotero.Schema</this.migrateExtraFields@chrome://zotero/content/xpcom/schema.js:633:21
From previous event:
ZoteroService@file:///C:/Program%20Files%20(x86)/Zotero/components/zotero-service.js:352:7
@chrome://zotero/content/include.js:4:14
type:
values are you using in item Extra fields?type:
set tonote
orattachment
on an item with creators. Currently, on a schema update (or, soon, on an item save), it will actually change the item type to the one specified bytype:
if it's valid, but that might be a little dangerous — here it's actually trying to wipe out the creators, which aren't valid for the new item type. But the goal here is that if you have, say,type: standard
and that becomes a valid item type, the item will be updated automatically to use that type, so I'm not totally sure what we want to do.type: dataset
andtype: pamphlet
. Hard to check without Advanced Search in the web library.In the Test Items Library group (https://www.zotero.org/groups/2205533)—
type: dataset
,type: treaty
,type: figure
,type: pamphlet
,type: review-book
,type: review
, andtype: entry
are all used.type: note
ortype: attachment
.Startup debug won't finish submitting. Here is the output log: https://gist.github.com/bwiernik/ceabf6b97ce89455e2eaf1dbba277505
Looking at the log, it is erroring in https://www.zotero.org/groups/2368853, but that library doesn't have any
type:
at all.Here is the Debug ID for startup: D1606248865
Are you able to generate a Debug ID for startup — which should fail with an error — with a backup of the database from beta 8 or earlier? If you were getting this error and now you're not, it means that some creators were cleared from at least one of your items due to a
type:
entry, probably incorrectly, and I'd like to figure out how that was happening.This one I think is first through beta.9, so started without errors: D897021134
This one was before any of these updates (was from 2020-03-13): D144061227
Also starts without errors using beta.10.
type: note
ortype: attachment
, and that doesn't appear to be the case.Out of curiosity, when you have a line like this in Extra (see item WDZS4WXV in one of your libraries for the actual line), is that a mistake, or is that being used by something else:
author: Smith || ,, [@abc]
Because in the latest beta, that will be converted to
,, [@abc]
for firstName andSmith
for lastName.It looks like you also have a lot of creators in Extra that are already valid and being converted into real creators (e.g., 7TKDNA94).
And there are others where you have a
type:
for a valid item type, such as UC5CTW9W, which hadtype: broadcast
. That was converted into item type radioBroadcast, with an existing creator type updated to be valid for that item type.Mayo Clinic [@mayoclinic]
in the bibliography (no comma) butMayo Clinic
in the citation. It didn't work. The parsing you describe would be the correct behavior.The other valid creators being converted are fine. Those test items were a bunch of slight variations on the same item, and it was easier to generate the various iterations/combinations of creators working with Extra.
type: broadcast
would have been forpodcast
from before the CSL type mapping was changed from `song` to `broadcast`. Could you perhaps give a list of the other items for that case?type: broadcast
or for other cases oftype:
with a valid item type?For the former, I see J2LATH6C, WF85WQLC, NHLHA9AP, and HD6IJ3Z9.
For the latter, there's a
type: article-journal
that becamejournalArticle
(3PUSWMZZ) and atype: personal_communication
that becameinstantMessage
(EVMGSQDH).letter
to preserve more fields.In general, I worry about field loss from these migrations. Is there a way to ensure that fields that would be lost in the transfer are instead moved to Extra?
Migrating
issued
is also problematic. Zotero's date parser is less flexible than citeproc-js's (e.g., citeproc-js supports date ranges, BCE dates, uncertain dates), and storingissued
in Extra has been a way to get access to citeproc-js's more flexible date parser (e.g., EVMGSQDH had a date range provided as 1930_1967; that renders correctly as 1930–1967 when pulled from Extra, but incorrectly literally as 1930_1967 when entered indate
. Perhaps before this rolls out, a more flexible date parser from citeproc-js or BetterBibTeX should replace Zotero's current parser (BBT's is the most flexible)?For
type: broadcast
, this will be a rare occurrence in general I suspect, but I imagine the most common function application would be to remappodcast
, so perhaps that migration would make more sense? Items of typepodcast
would already have been mapped totype: broadcast
anyway, so perhaps this function should check the current item type before migrating?letter
. The schema has an ordered list of possible Zotero types, and it's supposed to use the first one.We also should check to make sure the current Zotero item type isn't one of the other possible types for that CSL type, and remove the redundant
type:
line if so. (Is that what you're suggesting re: podcast?) Yes, if Extra specifies a different type, we can move existing fields that would be invalid in the new type to Extra. Alternatively, we could just ignoretype:
altogether and have people migrate those manually. @emilianoeheyns: BBT is using the EDTF library @inukshuk wrote, right? We can do that. That would mean movingpodcast
abovetvBroadcast
in schema.json.Type migration is probably fine? So long as there is no data loss.
@dstillman inukshuk's EDTF.js is part of my date parsing strategy, but BBT does a lot more:
edtfy
; if that fails:edtfy
, then to EDTF.js; if that fails:Forthcoming
)As you can imagine this date parser isn't particularly fast, but it does what I consider to be the right thing on a wide range of input.