Opened 8 years ago
Closed 8 years ago
#1062 closed defect (fixed)
Zotero RDF import/export problems with empty collections
| Reported by: | dstillman | Owned by: | simon |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.0.7 |
| Component: | export | Version: | 1.0 |
| Keywords: | Cc: | stakats, tjowens |
Description
Various problems with importing and exporting of empty collections/subcollections that should be fixed for 1.0.7 (which we need to get out ASAP because of a Fx 3.0.1 compatibility fix):
1) Create a collection with one item, a subcollection with no items, and a subsubcollection with one item. Right-click top collection, export as Zotero RDF, get error:
Error: returnItem.isAttachment is not a function
Source file: chrome://zotero/content/xpcom/translate.js
Line: 1947
2) Create an empty collection with a subcollection containing one item. Right-click collection, export as Zotero RDF, get error:
Error: this._itemsLeft.concat is not a function
Source file: chrome://zotero/content/xpcom/translate.js
Line: 1773
This one is probably new since r2998 (since before that it wasn't possible to export collections with no items) and is the least important.
3a) Create the same three levels of collections, with a single collection in each. Export as ZRDF. Import. I get either two or all three items (not sure why I'm getting inconsistent results) in the top collection, along with the item in its appropriate subcollection.
3b) Many users are reporting a problem of imported subcollections being empty, though I haven't seen it myself and don't think we have a simple test case. This may be related to 3a above. It also may have something to do with empty subcollections that contain collections with items. I can try to find a test case if the fix doesn't seem obvious.
Change History (8)
comment:1 Changed 8 years ago by dstillman
comment:2 Changed 8 years ago by simon
comment:3 Changed 8 years ago by simon
- Resolution set to fixed
- Status changed from new to closed
comment:4 Changed 8 years ago by dstillman
Re: 3A, why should all imported items be added to the "Imported <DATE>" collection if all collections are represented below it? Isn't it enough for the children to go in the imported top-level collection and subcollections that are placed under it and leave the "Imported <DATE>" collection empty?
comment:5 Changed 8 years ago by simon
We could do that too, although it seems like there are cases where a user might want to see/search/delete all of the items they just added to their library. Additionally, if a user imports another user's library, with the current structure, the top-level collection is analogous to the "My Library" view when a user imports an entire library.
comment:6 Changed 8 years ago by dstillman
OK, that's reasonable. They could also do this with recursiveCollections, which may be a UI option on the collection eventually, but the My Library parallel makes sense.
comment:7 Changed 8 years ago by stakats
- Resolution fixed deleted
- Status changed from closed to reopened
3B still seems to be a problem on my end. I'll email Simon a zipped copy of my database to verify. Export as Zotero RDF and then import into a new database. Subcollections are empty.
comment:8 Changed 8 years ago by simon
- Resolution set to fixed
- Status changed from reopened to closed
Note that there's some weird UI tree stuff after importing in 3a, but that's cosmetic only.