mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Cannot import data into existing collection (each time I import, a new collection with the same name is created) #2086
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Aclz on GitHub (Nov 13, 2024).
Vaultwarden Support String
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: ADMIN_TOKEN
Vaultwarden Build Version
1.32.4
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
nginx/1.18.0 (Ubuntu)
Host/Server Operating System
Linux
Operating System Version
Ubuntu 20.04
Clients
Web Vault
Client Version
2024.6.2c Firefox 132.0.1
Steps To Reproduce
Expected Result
The data is imported into an existing collection chosen in the "Collection" field
Actual Result
The data is imported into a newly created collection with the same name as the chosen collection.
Logs
No response
Screenshots or Videos
No response
Additional Context
No response
@BlackDex commented on GitHub (Nov 13, 2024):
If you exported items from an org which are already in a collection (with the same name or not), and import that export into a different org which might have a collection with the same name but not the same uuid, then it will create a new one.
This is not something we can fix, as the server doesn't know what the names of the collections are, and we can't match them.
If you exported it from the exact same org, delete every cipher, and then import, it should use the same collections.
It might be that it has a link with #4700, fixed in #4702
In that case we might be able to fix it.
Could you provide more details like, is it from Org X to Org Y.
And i Org Y there just is a collection with the exact same name as in X, but both are created manually?
@Aclz commented on GitHub (Nov 13, 2024):
No, I don't import anything previously exported, just import some brand new data, like generated somewhere else username-password pairs.
The pasted csv data for import is something like this:
When I took a look an the HTTP request made by the web client when I press "Import" (the call to /api/ciphers/import-organization), I see the same collection ID passed in the request JSON as long as I choose the same collection to import into. So I assume the client passes the known collection ID to the server to import to the particular existing collection. But I always get a newly created collection.
@BlackDex commented on GitHub (Nov 13, 2024):
Ok cool. Then it looks like it's the exact same issue as with the folders. Which should be not that hard to resolve.
Thanks for the details.
@BlackDex commented on GitHub (Nov 16, 2024):
Found and solved the issue. Thanks again for reporting.